changeset 5079:32ad275278d0

action anywikidraw: fixed url mapping bug in attachment_drawing
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 02 Sep 2009 17:10:39 +0200
parents 37a4d53c56d1
children 67114f9e3d81
files MoinMoin/action/anywikidraw.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/anywikidraw.py	Tue Sep 01 23:06:28 2009 +0200
+++ b/MoinMoin/action/anywikidraw.py	Wed Sep 02 17:10:39 2009 +0200
@@ -83,10 +83,11 @@
         # XXX check how that is done by josef
         # we have a image map. inline it and add a map ref to the img tag
         mapid = 'ImageMapOf' + drawing
-        map = map.replace('%MAPNAME%', mapid)
+        map = map.replace('id="%s.svg"' % drawing, '')
+        map = map.replace('name="%s.svg"' % drawing, 'name="%s"' % mapid)
         # add alt and title tags to areas
-        map = re.sub(r'href\s*=\s*"((?!%ANYWIKIDRAW%).+?)"', r'href="\1" alt="\1" title="\1"', map)
-        map = map.replace('%ANYWIKIDRAW%"', '%s" alt="%s" title="%s"' % (drawing_url, title, title))
+        #map = re.sub(r'href\s*=\s*"((?!%TWIKIDRAW%).+?)"', r'href="\1" alt="\1" title="\1"', map)
+        #map = map.replace('%TWIKIDRAW%"', '%s" alt="%s" title="%s"' % (drawing_url, title, title))
         # unxml, because 4.01 concrete will not validate />
         map = map.replace('/>', '>')
         title = _('Clickable drawing: %(filename)s') % {'filename': self.text(drawing)}