diff --git a/InterwikiPlugin/data/System/InterwikiPlugin.txt b/InterwikiPlugin/data/System/InterwikiPlugin.txt index efd84dc285..eeb30c682c 100644 --- a/InterwikiPlugin/data/System/InterwikiPlugin.txt +++ b/InterwikiPlugin/data/System/InterwikiPlugin.txt @@ -53,10 +53,11 @@ The =INTERWIKIPLUGIN_INTERLINKFORMAT= supports a number of formatting tokens: | Version: | %$VERSION% | | Release: | %$RELEASE% | | Change History: |   | -| 10 Dec 2010: | Foswiki:Main.AndrewJones - Allow the =INTERWIKIPLUGIN_RULESTOPIC= to be a comma separated list. Implements Foswiki:Development/InheritWikiLinksTopics. | +| 13 Dec 2010: | Foswiki:Main.AndrewJones - Fix inter-wiki's with paranthesis (Foswikitask:Item10151) | +| 10 Dec 2010: | Foswiki:Main.AndrewJones - Allow the =INTERWIKIPLUGIN_RULESTOPIC= to be a comma separated list. Implements Foswiki:Development/InheritWikiLinksTopics | | 12 Jul 2010: | Foswiki:Main.AndrewJones - Check access controls on !InterWikis topic | | 10 Jul 2010: | =mod_perl= and =FastCGI= compatible | -| 20 Sep 2009: | Version from 15 Apr now included with Foswiki 1.0.7. | +| 20 Sep 2009: | Version from 15 Apr now included with Foswiki 1.0.7 | | 15 Apr 2009: | Foswiki:Main.CrawfordCurrie - removed plugin preferences from this topic | | 16 Dec 2008: | Foswiki:Main.KennethLavrsen - Foswiki version - no features changed | | 03 Aug 2008: | TWiki 4.2.1 release version | diff --git a/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm b/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm index fe3ceed5f0..d0ae10a70a 100644 --- a/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm +++ b/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm @@ -27,7 +27,7 @@ use Foswiki::Func (); # The plugins API use Foswiki::Plugins (); # For the API version our $VERSION = '$Rev$'; -our $RELEASE = '10 Dec 2010'; +our $RELEASE = '13 Dec 2010'; our $NO_PREFS_IN_TOPIC = 1; our $SHORTDESCRIPTION = 'Link !ExternalSite:Page text to external sites based on aliases defined in a rules topic'; @@ -56,7 +56,7 @@ sub initPlugin { %interSiteTable = (); $sitePattern = "([$ua][$man]+)"; $pagePattern = - "([${man}_\/][$man" . '"\'\.\/\+\_\,\&\;\:\=\!\?\%\#\@\-]*?)'; + "([${man}_\/][$man" . '"\'\.\/\+\_\,\&\;\:\=\!\?\%\#\@\-\(\)]*?)'; # Get plugin preferences from InterwikiPlugin topic $interLinkFormat = @@ -113,7 +113,7 @@ s/(\[\[)$sitePattern:$pagePattern(\]\]|\]\[[^\]]+\]\])/_link($1,$2,$3,$4)/ge; # ref in text $_[0] =~ -s/(^|[\s\-\*\(])$sitePattern:$pagePattern(?=[\s\.\,\;\:\!\?\)\|]*(\s|$))/_link($1,$2,$3)/ge; +s/(^|[\s\-\*\(])$sitePattern:$pagePattern(?=[\s\.\,\;\:\!\?\|]*(\s|$))/_link($1,$2,$3)/ge; return; } diff --git a/InterwikiPlugin/test/unit/InterwikiPlugin/InterwikiPluginTests.pm b/InterwikiPlugin/test/unit/InterwikiPlugin/InterwikiPluginTests.pm index 88ced59e93..c94754d8f8 100644 --- a/InterwikiPlugin/test/unit/InterwikiPlugin/InterwikiPluginTests.pm +++ b/InterwikiPlugin/test/unit/InterwikiPlugin/InterwikiPluginTests.pm @@ -179,4 +179,13 @@ HERE ); } +# http://foswiki.org/Tasks/Item10151 +sub test_link_with_parentheses { + my $this = shift; + $this->assert_html_equals( +'Wikipedia:Fork_(software_development)', + Foswiki::Func::renderText( "Wikipedia:Fork_(software_development)", $this->{test_web} ) + ); +} + 1;