Item5025: Allow equal sign in Page name regex
Priority: Enhancement
Current State: Closed
Released In:
Target Release: n/a
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