You are here: Foswiki>Tasks Web>Item10782 (17 Dec 2011, GeorgeClark)Edit Attach

Item10782: InterwikiPlugin doesn't handle some external sites

pencil
Priority: Enhancement
Current State: Closed
Released In: 1.1.4
Target Release: patch
Applies To: Extension
Component: InterwikiPlugin
Branches:
Reported By: TimotheLitt
Waiting For:
Last Change By: GeorgeClark
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
 

ItemTemplate edit

Summary InterwikiPlugin doesn't handle some external sites
ReportedBy TimotheLitt
Codebase 1.1.4 beta1, 1.1.3, trunk
SVN Range
AppliesTo Extension
Component InterwikiPlugin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins distro:4a5139bc5cb1 distro:eaae0affda46
TargetRelease patch
ReleasedIn 1.1.4
Topic revision: r7 - 17 Dec 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy