[Zope-Checkins] CVS: Zope2 - PropertySheets.py:1.74.4.5

andreas@serenade.digicool.com andreas@serenade.digicool.com
Thu, 5 Jul 2001 12:42:10 -0400


Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade:/tmp/cvs-serv31061/lib/python/OFS

Modified Files:
      Tag: Zope-2_4-branch
	PropertySheets.py 
Log Message:




--- Updated File PropertySheets.py in package Zope2 --
--- PropertySheets.py	2001/07/05 14:53:22	1.74.4.4
+++ PropertySheets.py	2001/07/05 16:42:09	1.74.4.5
@@ -814,8 +814,10 @@
     (e.g. containing accented characters). Also we convert "<" and ">"
     to entities to keep the properties XML compliant. 
     """
-
-    v = str(v).replace('<','&lt;')
-    v = v.replace('>','&gt;')
+    v = str(v)
+    
+    if v.count('<') != v.count('>'): 
+        v = v.replace('<','&lt;')
+        v = v.replace('>','&gt;')
 
     return  unicode(v,"latin-1").encode("utf-8")