Bug: Interwiki plugin fails when page data includes %

If an interwiki link includes a % sign, the page match is chopped at that point. This is a problem if you use % URLENCODE% to create a page portion of the link. Why would you do that you ask? How about external searches like: Google:search%20term should work as well as Google:test.

Test case

Google:search%20term

Possible fix

It looks like this pattern:

 $pagePattern = '([a-zA-Z0-9_\/][a-zA-Z0-9\-\+\_\.\,\;\:\!\?\/]+?)'; 

need to be enhanced with a \% inside the second set of square brackets.

Environment

TWiki version: Alpha
TWiki plugins: Many, Interwiki with alpha
Server OS: Linux RedHat 7.2
Web server: Apache
Perl version: 5.6.1
Client OS: any
Web Browser: any

-- JohnRouillard - 18 Aug 2002

Follow up

Been running it on my internal TWiki for a week with no ill effects, and its nice to be also to embed searches to google using interwiki. Have I missed anything that should prevent this from being added to BeijingRelease?

-- JohnRouillard - 26 Aug 2002

Fix record

Good point. Is now in TWikiAlphaRelease and TWiki.org. Test: Dictionary:feature%20creep. (This looks to me more like a feature enhancement then a bug fix smile )

-- PeterThoeny - 01 Sep 2002



How about one more change? Add a # as well. For example, I considered creating a glossary-type page on my wiki with anchors for each entry. Then you could link to an entry with Glossary:blah...but InterwikiPlugin doesn't seem to like the # in the pattern URL at all.

-- WalterMundt 14 Jan 2003

The Plugin allows now also the number sign # in the page name.

-- PeterThoeny - 19 Jan 2003

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2005-02-15 - SamHasler
 
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.