[Python-bugs-list] [ python-Bugs-440351 ] saxutils.escape needs to escape "quotes"
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 11 Jul 2001 03:32:08 -0700
Bugs item #440351, was opened at 2001-07-11 03:32
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=440351&group_id=5470
Category: XML
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Dalke (dalke)
Assigned to: Nobody/Anonymous (nobody)
Summary: saxutils.escape needs to escape "quotes"
Initial Comment:
XML attributes containing a value with a double
quote are not properly escaped. Consider
from xml.sax import saxutils
gen = saxutils.XMLGenerator()
gen.startDocument()
gen.startElement('spam', {'width': '12"'})
This produces
<?xml version="1.0" encoding="iso-8859-1"?>
<spam width="12"">
That second line should more likely be
<spam width="12"">
or perhaps use the hex escape, which I think
is ''. But I'm not an XML guru so don't
trust me on either one!
Andrew Dalke
dalke@acm.org
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=440351&group_id=5470