r5470 - trunk/wooly/python/wooly
croberts at fedoraproject.org
croberts at fedoraproject.org
Tue Sep 18 19:52:59 UTC 2012
Author: croberts
Date: 2012-09-18 19:52:58 +0000 (Tue, 18 Sep 2012)
New Revision: 5470
Modified:
trunk/wooly/python/wooly/util.py
Log:
Addressing BZ 809006 by tweaking our xml_escape routine to first unescape the given string (in case it was already escaped...or contained some escaped characters) and then perform the usual xml_escape sequence.
Modified: trunk/wooly/python/wooly/util.py
===================================================================
--- trunk/wooly/python/wooly/util.py 2012-09-14 18:42:21 UTC (rev 5469)
+++ trunk/wooly/python/wooly/util.py 2012-09-18 19:52:58 UTC (rev 5470)
@@ -24,9 +24,10 @@
def xml_escape(string, entities=None):
if type(string) in (str, unicode):
+ unescaped = unescape_entity(string)
if entities is None:
entities = quote_entities
- return escape(string, entities)
+ return escape(unescaped, entities)
return string
def unique_id():
More information about the cumin-developers
mailing list