[docs] Minor mistake on HTMLParser docs

Eric Higgins erichiggins at gmail.com
Mon Aug 5 23:13:36 CEST 2013


There's a minor mistake on the doc page for the HTMLParser

The last snippet labeled: "*Parsing invalid HTML (e.g. unquoted attributes)
also works:*" is mistaken in assuming that unquoted attributes are invalid.

  >>> parser.feed('<p><a class=link href=#main>tag soup</p ></a>')

According to the
HTML5 <http://dev.w3.org/html5/markup/syntax.html#syntax-attr-unquoted>attribute
syntax spec, the example you provide are actually perfectly valid
attribute definitions. You could add a space or other breaking/invalid
character to the attribute value to correct it.

-Eric Higgins
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20130805/9fda78bc/attachment.html>

More information about the docs mailing list