Bug: Incorrect URL Rendering in WebChanges
The links at the bottom of the
WebChanges page that show the 100, 200, 400, 800 most recent changes are broken.
- Source:
[[%SCRIPTURL%/search%SCRIPTSUFFIX%/%INCLUDINGWEB%/?search=%5C.*&scope=topic&order=modified&reverse=on®ex=on&nosearch=on&limit=100][100]]
- Renders as:
<span style='background : #FFFFCE;'><font color="#0000FF">100</font></span><a href="/cgi-bin/edit/Codev/HttpTWikiorgcgi-binsearchCodevsearch5Cscopetopicordermodifiedreverseonregexonnosearchonlimit100?topicparent=Codev.WebChanges">?</a>
- Expected:
<a href="https://www.twiki.org/cgi-bin/search/Codev/?search=%5C.*&scope=topic&order=modified&reverse=on®ex=on&nosearch=on&limit=100">100</a>
Test case
Look at
TWiki.WebChanges and
Codev.WebChanges
Environment
--
PeterThoeny - 08 Oct 2003
Follow up
This should be fixed before the next Beta release.
--
PeterThoeny - 08 Oct 2003
Fix record
Fix is now in
TWikiAlphaRelease and at TWiki.org.
The bug was introduced in
TopicsInIncludedLinkToIncludingWeb, which is a fix for broken WikiWord links if topics got included from a different web. That fix did not account for URL links like
[[http:/...][...]].
Patch for
twiki/lib/TWiki.pm, function
fixIncludeLink:
Index: TWiki.pm
===================================================================
RCS file: /cvsroot/twiki/twiki/lib/TWiki.pm,v
retrieving revision 1.240
retrieving revision 1.241
diff -C2 -r1.240 -r1.241
*** TWiki.pm 29 Sep 2003 01:15:31 -0000 1.240
--- TWiki.pm 19 Oct 2003 08:33:03 -0000 1.241
***************
*** 118,122 ****
# ===========================
# TWiki version:
! $wikiversion = "28 Sep 2003";
# ===========================
--- 118,122 ----
# ===========================
# TWiki version:
! $wikiversion = "19 Oct 2003";
# ===========================
***************
*** 1329,1342 ****
if( $theLabel ) {
# [[...][...]] link
! if( $theLink =~ /^($webNameRegex|$defaultWebNameRegex)\./ ) {
! return "[[$theLink][$theLabel]]";
}
return "[[$theWeb.$theLink][$theLabel]]";
} else {
# [[...]] link
! if( $theLink =~ /^($webNameRegex|$defaultWebNameRegex)\./ ) {
! return "[[$theLink]]";
}
return "[[$theWeb.$theLink][$theLink]]";
}
--- 1329,1344 ----
if( $theLabel ) {
# [[...][...]] link
! if( $theLink =~ /^($webNameRegex\.|$defaultWebNameRegex\.|$linkProtocolPattern\:)/ ) {
! return "[[$theLink][$theLabel]]"; # no change
}
+ # add 'Web.' prefix
return "[[$theWeb.$theLink][$theLabel]]";
} else {
# [[...]] link
! if( $theLink =~ /^($webNameRegex\.|$defaultWebNameRegex\.|$linkProtocolPattern\:)/ ) {
! return "[[$theLink]]"; # no change
}
+ # add 'Web.' prefix
return "[[$theWeb.$theLink][$theLink]]";
}
--
PeterThoeny - 19 Oct 2003