[XML-SIG] [ pyxml-Bugs-722097 ] newlines in attribute values not escaped when writing

SourceForge.net noreply@sourceforge.net
Tue, 15 Apr 2003 13:43:05 -0700


Bugs item #722097, was opened at 2003-04-15 12:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=722097&group_id=6473

Category: SAX
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Chapman (glchapman)
Assigned to: Nobody/Anonymous (nobody)
Summary: newlines in attribute values not escaped when writing

Initial Comment:
Neither xml.sax.writer.XmlWriter (nor PrettyPrinter) nor sax.saxutils.XmlGenerator escapes newlines embedded in attribute values (the values in the attrs passed to startElement).  I am no expert on XML, but I believe they should be escaped (see, for example, dom.ext.Printer which apparently does escape them in TranslateCdataAttr).

In general, I wonder if there should be some way to specify additional entities which can be passed to the calls to sax.saxutils.escape made by the different sax outputters?


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=722097&group_id=6473