Commits

Anonymous committed b105cc4

Simple fix for the `ImageMacro` code introduced in [milestone:0.9.5], which failed to handle the size specified with "%". Reported in #3108.

  • Participants
  • Parent commits 1b8ec85
  • Branches 0.9-stable

Comments (0)

Files changed (1)

File trac/wiki/macros.py

             img_style = '; '.join(['%s:%s' % (k, escape(v))
                                    for k, v in style.iteritems()])
             img_attr += ' style="%s"' % img_style
-        result = Markup('<img src="%%s" %s />' % img_attr, raw_url).sanitize()
+        result = Markup('<img src="%%s" %s />' % img_attr.replace('%', '%%'),
+                        raw_url).sanitize()
         if not nolink:
             result = Markup('<a href="%s" style="%s">%s</a>',
                             url, a_style, result)