dabo Commit
Revision 5300
Date: 2009-07-22 11:50:53 -0700 (Wed, 22 Jul 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5300

Changed:
U   trunk/dabo/lib/xmltodict.py

Log:
Fixed xmltodict to also convert > (>) per Larry.


Diff:
Modified: trunk/dabo/lib/xmltodict.py
===================================================================
--- trunk/dabo/lib/xmltodict.py 2009-07-17 00:14:01 UTC (rev 5299)
+++ trunk/dabo/lib/xmltodict.py 2009-07-22 18:50:53 UTC (rev 5300)
@@ -146,7 +146,7 @@
        def CharacterData(self, data):
                """SAX character data event handler"""
                if self._inCode or data.strip():
-                       data = data.replace("&lt;", "<")
+                       data = data.replace("&lt;", "<").replace("&gt;",">")
                        data = data     #.encode()
                        if self._inCode:
                                if self._mthdCode:
@@ -296,7 +296,7 @@
        else:
                ret += ">"
                if dct.has_key("cdata"):
-                       ret += "%s" % dct["cdata"].replace("<", "&lt;")
+                       ret += "%s" % dct["cdata"].replace("<", 
"&lt;").replace(">", "&gt;")
 
                if dct.has_key("code"):
                        if len(dct["code"].keys()):




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to