[dokuwiki] Re: interwiki links suggestion - more than one parameter in URL and rawurlencode

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 1 Jul 2006 10:38:44 +0200

Hi!

> This is how the link in interwiki.local.conf looks like:
> 
> gentoohb           
> http://gentoo.org/doc/en/handbook/handbook-x86.xml?
> 
> an interwiki link would look like this
> 
> [[gentoobh>part=1&chap=7]]
> 
> The problem is that the last part of the URL gets urlencoded by
> dokuwiki (in inc/parser/xhtml.php) which results in the following.
> 
> http://gentoo.org/doc/en/handbook/handbox-x86.xml?part%3D1%26chap%3D7

Just define the interwiki link like this:

gentoohb http://gentoo.org/doc/en/handbook/handbook-x86.xml?{NAME}

This will not encode the given handle and should work as intended.
 
> You only need & = to build such links and I think that "decoding"
> those 2 in the final url won`t be a problem. Attached is patch which
> does exactely that (just one line of code in inc/parser/xhtml.php in
> function interwiki()). 

This is not a good Idea because I might want to link to a page in
another Wiki containing a & or =.

Andi

-- 
http://www.splitbrain.org
-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: