This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: HTMLParser -- allow comma in unquoted attribute values
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fantoozler, fdrake, nnorwitz
Priority: normal Keywords: patch

Created on 2003-01-17 11:15 by fantoozler, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch-01.txt fantoozler, 2003-01-17 18:46
patch-01.txt fantoozler, 2003-01-25 00:18
patch-parser-attrib.txt fantoozler, 2003-01-25 03:48
patch-parser-attrib.txt fantoozler, 2003-01-25 04:02
Messages (5)
msg42445 - (view) Author: j paulson (fantoozler) Date: 2003-01-17 11:15
An HTML document in the wild had the tag:

<font size="-1" color=rgb(175,18,3)>

and HTMLParser was choking on the "," after the 
"175".  By adding "," to the list of allowed characters 
in attribute values, HTMLParser accepts the document.
msg42446 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-17 14:17
Logged In: YES 
user_id=33168

Was this supposed to be a patch or a bug report?  There is
no patch attached.
msg42447 - (view) Author: j paulson (fantoozler) Date: 2003-01-17 18:46
Logged In: YES 
user_id=690612

I'll attach the patch file again.  
msg42448 - (view) Author: j paulson (fantoozler) Date: 2003-01-25 00:18
Logged In: YES 
user_id=690612

Added test case to Lib/test/test_htmlparser.py in addition to the 
HTMLParser.py patch
msg42449 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2003-03-14 16:35
Logged In: YES 
user_id=3066

The regression test does not appear to have been attached; I
see four copies of essentially the same patch.

That's OK though; I have enough to go on.  I've incorporated
the patch in both Lib/HTMLParser.py 1.12 and Lib/sgmllib.py
1.42 (so it also fixes htmllib).  Regression tests have been
added to Lib/test/test_htmlparser.py 1.10 and
Lib/test/test_sgmllib.py 1.5.
History
Date User Action Args
2022-04-10 16:06:08adminsetgithub: 37787
2003-01-17 11:15:14fantoozlercreate