html5lib / html5lib-tests

Testsuite data for html5lib, including the de-facto standard HTML parsing tests.
MIT License
188 stars 58 forks source link

\xa0 not interpreted as a space. #124

Open danthedeckie opened 4 years ago

danthedeckie commented 4 years ago
    html5lib.HTMLParser(html5lib.treebuilders.getTreeBuilder('dom'), strict=True).parseFragment('<img src="/test.jpg">')

if the space between img and src is actually a \xa0 byte, then strict mode throws an

    ParseError: Unexpected character after / in tag. Expected >

Error, which isn't very helpful.