Lexer returns a TagNode with a 'null' name
Brought to you by:
derrickoswald
If you pass the following char sequence (this was from
an actual website: "<!\r\nMSIE->"
Then the Lexer.getNode(boolean) gets the first 2 chars
fine but the '/r/n' is then converted to a single '/n'
char by Page.getCharacter() but since the next char
isn't '-' it calls Cursor.retreat() which moves the
cursor back to the '/r' character (not the '!') and
then calls Lexer.parseTag(), which results in skipping
the '!' char and the tag then has a null name.
If the char sequence doesn't include the '/r' character
then the tag name is '!' which is reasonable all things
considered.
Logged In: NO
Use a more careful cursor retreat - Page.ungetCharacter().