[Python-Dev] Grzegorz Adam Hankiewicz found a parsing bug in HTMLParser.

Fred L. Drake, Jr. fdrake@acm.org
Mon, 10 Feb 2003 09:59:22 -0500


People wrote:
 > > > A bit of investigation showed that the bug exists because of that line:
 > > >         <a href="http://ss"title="pe">P</a>
 > > Which is blatantly invalid HTML, of course.
 > Well, same for me, but as OP said, the w3c validator says the page is ok.

I've opened a bug report on this:

http://www.python.org/sf/683938

I generally take the position that the "letter of the law" is all we
should worry about in cases like this, but the fact that the W3C
validator tells me "the law" isn't exactly interested in this
distinction.  So we should at least tolerate this construct since it
isn't *ambiguous* -- it's just not legal.

"Be lenient in what you accept, strict in what you generate."  Or
something like that.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation