comparison 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
comparison
equal deleted inserted replaced
5776:70dfb3dea12d 5777:fa44b15b1ff1
359 for match in header1_re.finditer(daycontent): 359 for match in header1_re.finditer(daycontent):
360 if match: 360 if match:
361 title = match.group(1) 361 title = match.group(1)
362 title = wikiutil.escape(title).replace("'", "\\'") 362 title = wikiutil.escape(title).replace("'", "\\'")
363 titletext.append(title) 363 titletext.append(title)
364 tipname_unescaped = link.replace("'", "\\'")
364 link = wikiutil.escape(link).replace("'", "\\'") 365 link = wikiutil.escape(link).replace("'", "\\'")
365 tipname = link 366 tipname = link
366 tiptitle = link 367 tiptitle = link
367 tiptext = '<br>'.join(titletext) 368 tiptext = '<br>'.join(titletext)
368 maketip_js.append("maketip('%s','%s','%s');" % (tipname, tiptitle, tiptext)) 369 maketip_js.append("maketip('%s','%s','%s');" % (tipname, tiptitle, tiptext))
369 attrs = {'onMouseOver': "tip('%s')" % tipname, 370 attrs = {'onMouseOver': "tip('%s')" % tipname_unescaped,
370 'onMouseOut': "untip()"} 371 'onMouseOut': "untip()"}
371 else: 372 else:
372 csslink = "cal-emptyday" 373 csslink = "cal-emptyday"
373 if parmtemplate: 374 if parmtemplate:
374 query = {'action': 'edit', 'template': parmtemplate} 375 query = {'action': 'edit', 'template': parmtemplate}