Bug: includeUrl() screws up absolute urls
The arguments to cleanupIncludedHTML are read in the wrong order, causing absolute URLs (those beginning with a '/' (slash)) to be improperly rewritten.
Here is a unified diff that corrects this issue:
--- lib/TWiki.pm.orig 2004-07-23 14:16:36.000000000 -0400
+++ lib/TWiki.pm 2004-07-23 14:15:40.000000000 -0400
@@ -1794,7 +1794,7 @@
sub cleanupIncludedHTML
{
- my( $text, $path, $host ) = @_;
+ my( $text, $host, $path ) = @_;
# FIXME: Make aware of <base> tag
Test case
Include the a page, such as
http://sourceforge.net/projects/twiki/
Like so:
%INCLUDE{"http://sourceforge.net/projects/twiki/" pattern="^.*?Login via SSL</a><br>\s*(.*?)\n.*"}%
You get:
See what happens when you click on the "New User via SSL" link...notice that the URL is not a fully-qualified URL. Instead, the path part of the included url is inserted at the beginning of the link.
Environment
Category:
TWikiPatches
--
ChristopherRued - 23 Jul 2004
Follow up
This should be fixed for Cairo. --
CrawfordCurrie - 24 Jul 2004
Hmm...perhaps there's another issue. The link above still doesn't look right. The host should be sourceforge.net, not twiki.org --
CR
Nevermind, I downloaded source via
SVN, and tried it out myself. All is well. Thanks for the quick turn-around. --
ChristopherRued - 25 Jul 2004
Fix record
commited to
SVN, thankyou very much!
--
SvenDowideit - 24 Jul 2004