Description

If you put the macro MonthCalender on a page like Rock'n'Roll the maketip (tooltip) are not shown and there is an javascript error reported.

Steps to reproduce

  1. create a page with an apostrophe
  2. add the macro MonthCalendar

  3. add some pages/dates to the calendar
  4. try to hover over this "used" date
  5. tool-/maketip is not working, due an javascript error

Example

The problem is this generated JavaScript function call, with not escaped apostrophe:

maketip('Rock'n'Roll/Events/2008-07-01','Rock'n'Roll/Events/2008-07-01','White Lion, Pratteln ');

Component selection

Details

MoinMoin Version

1.7.3.0

OS and Version

Linux

Python Version

2.5.4

Server Setup

mod_wsgi

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

DE

Workaround

I changed this in the MonthCalendar macro, don't know if it's correct, atleast it works :-)

@@ -365,6 +367,7 @@
                             title = match.group(1)
                             title = wikiutil.escape(title).replace("'", "\\'")
                             titletext.append(title)
+                    link = wikiutil.escape(link).replace("'", "\\'")
                     tipname = link
                     tiptitle = link
                     tiptext = '<br>'.join(titletext)

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/MonthCalendarBreaksOnApostrophe (last edited 2008-07-18 07:56:03 by ThomasWaldmann)