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: add unescape method to xml.sax.saxutils
Type: Stage:
Components: XML Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, mboedick
Priority: normal Keywords: patch

Created on 2002-09-23 15:47 by mboedick, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
saxutils_escape_patch mboedick, 2002-09-23 15:47 patch to add unescape method to xml.sax.saxutils
saxutils.diff mboedick, 2002-10-15 19:43 add unescape() method for saxutils
Messages (4)
msg41210 - (view) Author: Matthew Boedicker (mboedick) Date: 2002-09-23 15:47
This patch adds an unescape() method to saxutils to
convert an xml-escaped string back to its original form

It also modifies the escape() method so that the core
escaping takes places after any additional escaping
passed in via the dictionary.  This will guarantee that
returned string is properly escaped for xml no matter
what is passed in via the dictionary.
msg41211 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-13 12:53
Logged In: YES 
user_id=21627

Can you please provide documentation and test cases?
msg41212 - (view) Author: Matthew Boedicker (mboedick) Date: 2002-10-15 19:43
Logged In: YES 
user_id=119895

added documentation and test cases

no longer changes the order in which escape() modifies the
string with core and passed-in replacements
msg41213 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-26 14:52
Logged In: YES 
user_id=21627

Thanks for the patch, committed as

xmlsaxutils.tex 1.4;
test_sax.py 1.23; 
output/test_sax 1.11; 
saxutils.py 1.17; 
ACKS 1.213; 
NEWS 1.504;
History
Date User Action Args
2022-04-10 16:05:41adminsetgithub: 37208
2002-09-23 15:47:16mboedickcreate