Author: tmckay
Date: 2012-05-18 20:22:17 +0000 (Fri, 18 May 2012)
New Revision: 5384
Modified:
trunk/wooly/python/wooly/util.py
Log:
Modify the xml_escape routine to escape double quotes as " by default.
If a specific entity list is passed in, double quotes will not be escpaed unless
they are specified in the entity list.
BZ807970
Modified: trunk/wooly/python/wooly/util.py
===================================================================
--- trunk/wooly/python/wooly/util.py 2012-05-18 14:41:34 UTC (rev 5383)
+++ trunk/wooly/python/wooly/util.py 2012-05-18 20:22:17 UTC (rev 5384)
@@ -18,8 +18,12 @@
from parsley.collectionsex import *
+quote_entities = {'"': """}
+
def xml_escape(string, entities=None):
if type(string) in (str, unicode):
+ if entities is None:
+ entities = quote_entities
return escape(string, entities)
return string
Show replies by date