[ python-Bugs-1424171 ] patch for etree cdata and attr quoting

SourceForge.net noreply at sourceforge.net
Sat Feb 4 19:29:50 CET 2006


Bugs item #1424171, was opened at 2006-02-04 19:23
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1424171&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: XML
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris McDonough (chrism)
>Assigned to: Fredrik Lundh (effbot)
Summary: patch for etree cdata and attr quoting

Initial Comment:
Attached is a patch for ElementTree (based on a checkout from the SVN 
trunk's xmlcore.etree) that seems to perform better escaping of cdata and 
attribute values.  Instead of replacing, for example "&quote;" with 
"&quote;" or "&" with "&", it tries to avoid requoting 
ampersands in things that look like entities.

Sorry, I haven't tested this with anything except Python 2.4, I'm not quite 
sure what to do about _encode_entity, and I haven't patched any tests or 
written a new one for this change.  Consider this more of a RFC than a 
patch ready-for-submission as a result.

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

>Comment By: Georg Brandl (birkenfeld)
Date: 2006-02-04 19:29

Message:
Logged In: YES 
user_id=1188172

OP: You did check the box?

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

Comment By: Chris McDonough (chrism)
Date: 2006-02-04 19:26

Message:
Logged In: YES 
user_id=32974

Sorry, the tracker doesn't seem to want to allow me to upload the file.  See 
http://www.plope.com/static/misc/betterescape.patch for the patch.

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

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


More information about the Python-bugs-list mailing list