Menu

#208 Lexer returns a TagNode with a 'null' name

v1.6
closed-fixed
5
2006-05-27
2006-05-23
No

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.

Discussion

  • Nobody/Anonymous

    • status: open --> closed
     
  • Nobody/Anonymous

    Logged In: NO

    Use a more careful cursor retreat - Page.ungetCharacter().

     
  • Nobody/Anonymous

    • labels: --> Scanner Bug
    • assigned_to: nobody --> derrickoswald
    • status: closed --> closed-fixed
     

Log in to post a comment.