[Zope-Checkins] CVS: Zope/lib/python/OFS - PropertySheets.py:1.89.4.5

Sidnei da Silva sidnei at awkly.org
Tue Mar 30 15:02:29 EST 2004


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv18243/lib/python/OFS

Modified Files:
      Tag: Zope-2_7-branch
	PropertySheets.py 
Log Message:
Escape value on propstat the same way it's done on allprops.


=== Zope/lib/python/OFS/PropertySheets.py 1.89.4.4 => 1.89.4.5 ===
--- Zope/lib/python/OFS/PropertySheets.py:1.89.4.4	Thu Jan  8 18:33:47 2004
+++ Zope/lib/python/OFS/PropertySheets.py	Tue Mar 30 15:02:28 2004
@@ -331,10 +331,9 @@
                 # Quote non-xml items here?
                 attrs=''
 
-            if hasattr(self,"dav__"+name):
-                prop='  <n:%s%s>%s</n:%s>' % (name, attrs, value, name)
-            else:
-                prop='  <n:%s%s>%s</n:%s>' % (name, attrs, xml_escape(value), name)
+            if not hasattr(self,"dav__"+name):
+                value = xml_escape(value)
+            prop='  <n:%s%s>%s</n:%s>' % (name, attrs, value, name)
 
             result.append(prop)
         if not result: return ''
@@ -382,8 +381,10 @@
             else:
                 # quote non-xml items here?
                 attrs=''
+            if not hasattr(self, 'dav__%s' % name):
+                value = xml_escape(value)
             prop='<n:%s%s xmlns:n="%s">%s</n:%s>\n' % (
-                 name, attrs, xml_id, value, name)
+                name, attrs, xml_id, value, name)
             code='200 OK'
             if not result.has_key(code):
                 result[code]=[prop]




More information about the Zope-Checkins mailing list