[Zope-Checkins] CVS: Zope/lib/python/OFS - Image.py:1.138

Andreas Jung andreas@digicool.com
Tue, 28 May 2002 13:37:49 -0400


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

Modified Files:
	Image.py 
Log Message:
Collector 404: ALT attribute is now escaped properly


=== Zope/lib/python/OFS/Image.py 1.137 => 1.138 ===
 from ZPublisher import HTTPRangeSupport
 from ZPublisher.HTTPRequest import FileUpload
+from cgi import escape
 
 StringType=type('')
 manage_addFileForm=DTMLFile('dtml/imageAdd', globals(),Kind='File',kind='file')
@@ -740,7 +741,7 @@
 
         if alt is None:
             alt=getattr(self, 'title', '')
-        result = '%s alt="%s"' % (result, alt)
+        result = '%s alt="%s"' % (result, escape(alt, 1))
 
         if height:
             result = '%s height="%s"' % (result, height)