Commit Graph

7 Commits

Author SHA1 Message Date
Fred Drake
7cf613dc77 HTMLParser is allowed to be more strict than sgmllib, so let's not
change their basic behavior:  When parsing something that cannot possibly
be valid in either HTML or XHTML, raise an exception.
2001-09-04 16:26:03 +00:00
Fred Drake
68eac2b574 Added reasonable parsing of the DOCTYPE declaration, fixed edge cases
regarding bare ampersands in content.
2001-09-04 15:10:16 +00:00
Fred Drake
029acfb922 Deal more appropriately with bare ampersands and pointy brackets; this
module has to deal with "class" HTML-as-deployed as well as XHTML, so we
cannot be as strict as XHTML allows.

This closes SF bug #453059, but uses a different fix than suggested in
the bug comments.
2001-08-20 21:24:19 +00:00
Fred Drake
1d4601d306 Change some comments into docstrings.
Fix handling of hexadecimal character references (legal in XHTML) so that
they are properly interpreted as character references.
This fixes SF bug #445196.
2001-08-03 19:50:59 +00:00
Fred Drake
1c48eb74c9 Merge my changes to the offending comment with Guido's changes. 2001-05-23 04:53:44 +00:00
Guido van Rossum
07f353c560 Removed incorrect comment left over from sgmllib.py. 2001-05-22 23:39:10 +00:00
Guido van Rossum
8846d7178b A much improved HTML parser -- a replacement for sgmllib. The API is
derived from but not quite compatible with that of sgmllib, so it's a
new file.  I suppose it needs documentation, and htmllib needs to be
changed to use this instead of sgmllib, and sgmllib needs to be
declared obsolete.  But that can all be done later.

This code was first published as part of TAL (part of Zope Page
Templates), but that was strongly based on sgmllib anyway.  Authors
are Fred drake and Guido van Rossum.
2001-05-18 14:50:52 +00:00