[Patches] [ python-Patches-1087808 ] sgmllib.SGMLParser does not unescape attribute values; patch

SourceForge.net noreply at sourceforge.net
Wed Dec 22 08:15:54 CET 2004


Patches item #1087808, was opened at 2004-12-18 21:42
Message generated for change (Comment added) made by titus
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1087808&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: Titus Brown (titus)
Assigned to: Martin v. Löwis (loewis)
Summary: sgmllib.SGMLParser does not unescape attribute values; patch

Initial Comment:
for example, in a form parsed by htmllib.HTMLParser (based on 
SGMLParser),

<option value="5&quot; big"> 5&quot; big

the value will not be unescaped to 5" while the printed
option will be.

Note that this behavior differs from that of 
HTMLParser.HTMLParser, which does a fine job.

See attached test script/test input for an example.

See attached patch for a fix: essentially I copied the code directly 
from HTMLParser.HTMLParser.

I don't think this patch should break anything; I can't imagine 
people were relying on this behavior!


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

>Comment By: Titus Brown (titus)
Date: 2004-12-21 23:15

Message:
Logged In: YES 
user_id=23486

oh, and here's the example.

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

Comment By: Titus Brown (titus)
Date: 2004-12-21 23:13

Message:
Logged In: YES 
user_id=23486

Whoops.  Dangitall.

Also at

http://issola.caltech.edu/~t/transfer/sgmllib.diff



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

Comment By: Martin v. Löwis (loewis)
Date: 2004-12-21 23:06

Message:
Logged In: YES 
user_id=21627

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1087808&group_id=5470


More information about the Patches mailing list