diff MoinMoin/macro/MonthCalendar.py @ 5777:fa44b15b1ff1

Fix MonthCalendar mouseover for pages with Ampersand in page name (was double-escaping)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 08 Apr 2011 01:06:06 +0200
parents d4331ca5c218
children
line wrap: on
line diff
--- a/MoinMoin/macro/MonthCalendar.py	Fri Apr 01 22:11:47 2011 +0200
+++ b/MoinMoin/macro/MonthCalendar.py	Fri Apr 08 01:06:06 2011 +0200
@@ -361,12 +361,13 @@
                             title = match.group(1)
                             title = wikiutil.escape(title).replace("'", "\\'")
                             titletext.append(title)
+                    tipname_unescaped = link.replace("'", "\\'")
                     link = wikiutil.escape(link).replace("'", "\\'")
                     tipname = link
                     tiptitle = link
                     tiptext = '<br>'.join(titletext)
                     maketip_js.append("maketip('%s','%s','%s');" % (tipname, tiptitle, tiptext))
-                    attrs = {'onMouseOver': "tip('%s')" % tipname,
+                    attrs = {'onMouseOver': "tip('%s')" % tipname_unescaped,
                              'onMouseOut': "untip()"}
                 else:
                     csslink = "cal-emptyday"