Menu

#142 Incorrect parsing from InputStream at closing script tag

open
nobody
scanner (58)
5
2012-07-27
2012-07-27
Anonymous
No

If the InputStream splits an ending script tag as "</" and "script> the parser misses the end script tag and incorretcly parses the page.

This bug is driving me mad because it only fails sometimes on the same exact page!

As pointed by Janito Vaqueiro Ferreira the problem may be at:
HTMLScanner.nextContent(int)
but I am having a hard time understanding that code.

I have developed a test case with an InputStream that exposes this problem.

Discussion

  • Anonymous

    Anonymous - 2012-08-09

    I have attached a potential fix for this issue.
    Could you try it?

     
  • Anonymous

    Anonymous - 2012-12-21

    The attached patch fixes the bug.
    It keeps the input buffer growing instead of clearing it at the wrong time.
    Fixing a bug should be higher priority than memory usage.
    Please, could you explain why you are not patching it?

     

Log in to post a comment.