Item10782: InterwikiPlugin doesn't handle some external sites
Priority: Enhancement
Current State: Closed
Released In: 1.1.4
Target Release: patch
Seems to be my day for bugs.
The InterwikiPlugin doesn't work when the page for an external site has unusual syntax; my case was spaces in the parameter list.
A failing case is:
https://www.example.com/photos/gallery.cgi?mode=view&photo=%2FFamily%2FDog%20Jumping%2F100_1027.jpg
Which one would like to link as:
Definition:
| Photo | https://www.example.com/photos/gallery.cgi?mode=view&photo=$page | Display a photo '$page' from the internal photo gallery |
Use:
photo:/Family/Dog Jumping/100_1027.jpg
I've developed a patch (as usual on TWiki - I really do want to migrate, but stuff keeps getting in the way) that extends the syntax to allow Site:'page spec' and Site::"Page spec" as well as the current syntax. This works stand-alone as well as in bracketed links. It also url-encodes the page specifier for the href (but not for display).
Details and the TWiki patch can be found at
http://twiki.org/cgi-bin/view/Support/SID-01186. I expect that it will be accepted.
Someone should port the patch to Foswiki, though you may want to wait a few daze in case it evolves a bit.
--
TimotheLitt - 23 May 2011
This was closed with a checkin onTWiki, including the documentation update. Ready to be pulled/ported.
Thanks.
--
TimotheLitt - 26 May 2011
Fix didn't quite work with Foswiki - needed some tweaks to the regex. Unit tests showed some sites with special characters that stopped working. Added a unit test for the single and double quoted pages with encoded special characters.
--
GeorgeClark - 30 Oct 2011