[Zope-Checkins] CVS: Zope2 - PropertySheets.py:1.74
andreas@serenade.digicool.com
andreas@serenade.digicool.com
Wed, 6 Jun 2001 10:47:48 -0400
Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade:/tmp/cvs-serv26084
Modified Files:
PropertySheets.py
Log Message:
Collector #2247: put values of properties into CDATA section to prevent
non XML compliant documents to be sent to a webdav client
--- Updated File PropertySheets.py in package Zope2 --
--- PropertySheets.py 2001/04/27 20:27:41 1.73
+++ PropertySheets.py 2001/06/06 14:47:47 1.74
@@ -375,10 +375,11 @@
else:
# Quote non-xml items here?
attrs=''
- prop=' <n:%s%s>%s</n:%s>' % (name, attrs, value, name)
+ prop=' <n:%s%s><![CDATA[%s]]></n:%s>' % (name, attrs, value, name)
result.append(prop)
if not result: return ''
result=join(result, '\n')
+
return propstat % (self.xml_namespace(), result, '200 OK', '')
def dav__propnames(self, propstat=propstat, join=string.join):