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

Matthew T. Kromer matt@zope.com
Wed, 14 Aug 2002 11:07:57 -0400


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

Modified Files:
	Image.py 
Log Message:
Update Image to include a "title" attribute on tag emission for Mozilla.


=== Releases/Zope/lib/python/OFS/Image.py 1.138 => 1.139 ===
--- Releases/Zope/lib/python/OFS/Image.py:1.138	Tue May 28 13:37:49 2002
+++ Releases/Zope/lib/python/OFS/Image.py	Wed Aug 14 11:07:56 2002
@@ -709,7 +709,7 @@
         return self.tag()
 
     def tag(self, height=None, width=None, alt=None,
-            scale=0, xscale=0, yscale=0, css_class=None, **args):
+            scale=0, xscale=0, yscale=0, css_class=None, title=None, **args):
         """
         Generate an HTML IMG tag for this image, with customization.
         Arguments to self.tag() can be any valid attributes of an IMG tag.
@@ -742,6 +742,10 @@
         if alt is None:
             alt=getattr(self, 'title', '')
         result = '%s alt="%s"' % (result, escape(alt, 1))
+
+        if title is None:
+            title=getattr(self, 'title', '')
+        result = '%s title="%s"' % (result, escape(title, 1))
 
         if height:
             result = '%s height="%s"' % (result, height)