skip> Instead of generating a URL like
    skip>     http://www/wiki/FrontPage#anchor
    skip> it generates
    skip>     http://www/wiki/FrontPage%23anchor
    skip> The culprit seems to be quoteWikiNameURL which calls urllib.quote 
like this:
    skip>     urllib.quote(pagename)
    skip> instead of
    skip>     urllib.quote(pagename, "/#")

I worked around this by changing NewWindow.py to compute the href then
replace the last occurrence of "%23" in the URL that's not followed by a
"/":

        # wiki link
        href = (macro.request.getScriptname() + '/' +
                wikiutil.quoteWikinameURL(href))
        href = re.sub("%23([^/]*)", r"#\1", href)
        html = '<a href="%(href)s" target="_blank"%(attribs)s>%(text)s</a>'
        % {
            'href':    href,
            'attribs': attribs,
            'text':    text,
        }

so there's no need to change quoteWikinameURL.  Still, I wonder if it would
be better in the long run if it didn't quote "#".

Skip

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Moin-user mailing list
Moin-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/moin-user

Reply via email to