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

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


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

Modified Files:
      Tag: Zope-2_5-branch
	Image.py 
Log Message:
Collector 404: ALT tag is now escaped properly


=== Zope/lib/python/OFS/Image.py 1.134.12.1 => 1.134.12.2 ===
 from mimetools import choose_boundary
 from ZPublisher import HTTPRangeSupport
+from cgi import escape
 
 StringType=type('')
 manage_addFileForm=DTMLFile('dtml/imageAdd', globals(),Kind='File',kind='file')
@@ -737,7 +738,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)