[Zope-Checkins] CVS: Zope/lib/python/OFS - PropertySheets.py:1.94
Sidnei da Silva
sidnei at awkly.org
Tue Mar 30 15:05:20 EST 2004
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv18969/lib/python/OFS
Modified Files:
PropertySheets.py
Log Message:
Escape value on propstat the same way its done on allprops.
=== Zope/lib/python/OFS/PropertySheets.py 1.93 => 1.94 ===
--- Zope/lib/python/OFS/PropertySheets.py:1.93 Thu Jan 15 17:50:17 2004
+++ Zope/lib/python/OFS/PropertySheets.py Tue Mar 30 15:05:20 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