• Show log

    Commit

  • Hash : 93ce33c2
    Author : Nick Wellnhofer
    Date : 2020-07-23T17:34:08

    Fix several quadratic runtime issues in HTML push parser
    
    Fix a few remaining cases where the HTML push parser would scan more
    content during lookahead than being parsed later.
    
    Make sure that htmlParseDocTypeDecl consumes all content up to the
    final '>' in case of errors. The old comment said "We shouldn't try to
    resynchronize", but ignoring invalid content is also what the HTML5
    spec mandates.
    
    Likewise, make htmlParseEndTag skip to the final '>' in invalid end
    tags even if not in recovery mode. This is probably the most visible
    change in practice and leads to different output for some tests but is
    also more in line with HTML5.
    
    Make sure that htmlParsePI and htmlParseComment don't abort if invalid
    characters are encountered but log an error and ignore the character.
    
    Change some other end-of-buffer checks to test for a zero byte instead
    of relying on IS_CHAR.
    
    Fix usage of IS_CHAR macro in htmlParseScript.