Item5025: Allow equal sign in Page name regex

pencil
Priority: Enhancement
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: InterwikiPlugin
Branches:
Reported By: TWiki:Main.PeterThoeny
Waiting For:
Last Change By: CrawfordCurrie

Listed in TWiki:Plugins/InterwikiPluginDev topic:
Hi there, I just upgraded the internal TWiki deployment and had to add the '=' ('\=') to the pageSite regex. Could you please also add it to the actual plugin-code... thank you -- TWiki:Main/BenjaminFelder - 22 Nov 2007

Is this small change acceptable for the 4.2 release?

-- TWiki:Main.PeterThoeny - 25 Nov 2007

Kenneth?

-- TWiki:Main.PeterThoeny - 25 Nov 2007

A few more words on this change? (I can't get it to make any sense).

-- TWiki:Main.SteffenPoulsen - 18 Dec 2007

The idea is to auto-link patterns such as Site:ID=1234, e.g. allow the equal sign in the page pattern.

-- TWiki:Main.PeterThoeny - 19 Dec 2007

Ah, that would allow for multiple params as well (id=1234;profile=2) .. sounds like a fair and safe change to me.

-- TWiki:Main.SteffenPoulsen - 19 Dec 2007

Let us ask the other question.

What can it break? I think it is safe too and relevant in many cases but let us think one more time. In which cases can this go wrong?

-- TWiki:Main.KennethLavrsen - 19 Dec 2007

Thanks to Peter™hoeny for a fix for this.

Index: lib/Foswiki/Plugins/InterwikiPlugin.pm
===================================================================
--- lib/Foswiki/Plugins/InterwikiPlugin.pm   (revision 2866)
+++ lib/Foswiki/Plugins/InterwikiPlugin.pm   (working copy)
@@ -84,7 +84,7 @@
     my $man = Foswiki::Func::getRegularExpression('mixedAlphaNum');
     my $ua = Foswiki::Func::getRegularExpression('upperAlpha');
     $sitePattern    = "([$ua][$man]+)";
-    $pagePattern    = "([${man}_\/][$man" . '\.\/\+\_\,\;\:\!\?\%\#\@\-]*?)';
+    $pagePattern    = "([${man}_\/][$man" . '\.\/\+\_\,\&\;\:\=\!\?\%\#\@\-]*?)';
 
     # Get plugin preferences from InterwikiPlugin topic
     $interLinkFormat =
Checked into trunk.

-- from PeterThoeny - 28 Feb 2009 via TWikibugs

ItemTemplate edit

Summary Allow equal sign in Page name regex
ReportedBy TWiki:Main.PeterThoeny
Codebase
SVN Range TWiki-4.3.0, Sat, 24 Nov 2007, build 15734
AppliesTo Extension
Component InterwikiPlugin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins distro:e66c3f1af97e
TargetRelease n/a
ReleasedIn
Topic revision: r7 - 04 Mar 2009, CrawfordCurrie
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