Description

MonthCalendar wrongly assumes the Wiki page itself does not contain % letters, which is the case with (quoted) non-ASCII letters.

Steps to reproduce

  1. Create a wiki page containing non-ASCII letters - like this: VelkomstKomitéen

  2. Add the MonthCalendar to that page

Example

Details

traceback.html

This Wiki.

Workaround

How to deal with the bug until it is fixed

Use a local copy of MonthCalendar patched with the following:

   1 --- MonthCalendar.py.orig       2006-03-28 23:16:55.000000000 +0200
   2 +++ MonthCalendar.py    2006-05-06 16:34:46.000000000 +0200
   3 @@ -311,11 +311,11 @@
   4      p = Page(request, thispage)
   5      qpagenames = '*'.join(map(wikiutil.quoteWikinameURL, parmpagename))
   6      qtemplate = wikiutil.quoteWikinameURL(parmtemplate)
   7 -    querystr = "calparms=%s,%d,%d,%d,%%d,%s" % (qpagenames, parmyear, parmmonth, parmoffset, qtemplate)
   8 -    prevlink  = p.url(request, querystr % (parmoffset2 - 1), 0)
   9 -    nextlink  = p.url(request, querystr % (parmoffset2 + 1), 0)
  10 -    prevylink = p.url(request, querystr % (parmoffset2 - 12), 0)
  11 -    nextylink = p.url(request, querystr % (parmoffset2 + 12), 0)
  12 +    querystr = "calparms=%%s,%d,%d,%d,%%d,%%s" % (parmyear, parmmonth, parmoffset)
  13 +    prevlink  = p.url(request, querystr % (qpagenames, parmoffset2 - 1, qtemplate), 0)
  14 +    nextlink  = p.url(request, querystr % (qpagenames, parmoffset2 + 1, qtemplate), 0)
  15 +    prevylink = p.url(request, querystr % (qpagenames, parmoffset2 - 12, qtemplate), 0)
  16 +    nextylink = p.url(request, querystr % (qpagenames, parmoffset2 + 12, qtemplate), 0)
  17      prevmonth = formatter.url(1, prevlink, 'cal-link') + '<' + formatter.url(0)
  18      nextmonth = formatter.url(1, nextlink, 'cal-link') + '>' + formatter.url(0)
  19      prevyear  = formatter.url(1, prevylink, 'cal-link') + '<<' + formatter.url(0)

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/MonthCalendarBreaksOnNonAsciiPage (last edited 2007-10-29 19:22:15 by localhost)