[Python-bugs-list] [ python-Bugs-445196 ] Hexadecimal character references break HTMLParser

noreply@sourceforge.net noreply@sourceforge.net
Fri, 27 Jul 2001 09:06:29 -0700


Bugs item #445196, was opened at 2001-07-27 08:19
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445196&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Hexadecimal character references break HTMLParser

Initial Comment:
This bug affects both the Python standard library and Zope TAL. 

Input such as this:

     “Backwards substitution” 

in a Page Template results in this error:

 <!-- Page Template Diagnostics
  Compilation failed
  TAL.HTMLParser.HTMLParseError: EOF in middle of entity or char ref, at line
 759, column 150

Chris Withers writes:
 > Squishdot has experienced this problem too.
 > It's a problem in HTMLPArser.py apparently.



----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-07-27 09:06

Message:
Logged In: YES 
user_id=6380

Aha. I guess you are already fixing it then. :-)

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-07-27 09:02

Message:
Logged In: YES 
user_id=3066

The summary line was wrong (now fixed); these are *not* malformed; they are hexidecimal character references and a legal XHTML.  As long as HTMLParser is trying to accept XHTML (which was part of its original purpose), it needs to accept these.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-07-27 08:55

Message:
Logged In: YES 
user_id=6380

Malformed HTML in general causes an exception.

What would you *want* to see happen?

Why can't you just fix the HTML source?  After all, it's
malformed!


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445196&group_id=5470