[Moin-user] quoteWikiNameURL defeats anchor usage in NewWindow macro

skip at pobox.com skip at pobox.com
Tue Sep 4 13:42:00 EDT 2007


One of our users began using the NewWindow macro last week and discovered he
couldn't use anchors in wiki page names.  For example, this fails:

    [[NewWindow(FrontPage#anchor)]]

Instead of generating a URL like

    http://www/wiki/FrontPage#anchor

it generates

    http://www/wiki/FrontPage%23anchor

The culprit seems to be quoteWikiNameURL which calls urllib.quote like this:

    urllib.quote(pagename)

instead of

    urllib.quote(pagename, "/#")

We're still using 1.3.5, but the code is the same in 1.5.8.

Is there some specific reason that "#" is not considered "safe"?

Thx,

-- 
Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/




More information about the Moin-user mailing list