Item212: stop url(http://... something.png) from being made into a html link, so inline images in css style isn't terminal
Priority: Normal
Current State: Closed
Released In: 1.0.0
Target Release: patch
Applies To: Engine
Component:
Branches:
Item210 showed up a problem with inline css when
PubUrlPath is set to an absolute URL (which happens to be legal as per code), or if the 'use absolute url's is chosen.
its clearly bug in several places - rendering should be more careful about what it turns into an
a href
, and Plugins (evidently) cannot assume that PUBURLPATH will actually be a path.
so, for the core, I'm going to apply
Index: lib/TWiki/Render.pm
===================================================================
--- lib/TWiki/Render.pm (revision 767)
+++ lib/TWiki/Render.pm (working copy)
@@ -1151,9 +1151,9 @@
$text =~ s/{$TWiki::TranslationToken/</go;
$text =~ s/}$TWiki::TranslationToken/>/go;
- # standard URI
+ # standard URI (don't modify if url(http://as) form
$text =~
-s/(^|[-*\s(|])($TWiki::regex{linkProtocolPattern}:([^\s<>"]+[^\s*.,!?;:)<|]))/$1._externalLink( $this,$2)/geo;
+s/(^|(?<!url)[-*\s(|])($TWiki::regex{linkProtocolPattern}:([^\s<>"]+[^\s*.,!?;:)<|]))/$1._externalLink( $this,$2)/geo;
# other entities
$text =~ s/&(\w+);/$TWiki::TranslationToken$1;/g; # "&abc;"
which will not make any
url()
into an
a href
Looks like
SmiliesPlugin also makes this assumption - fixing
crud -
lots of code makes this non-right assumption.
ok, so
TWiki::Func::getPubUrl()
should actually call
TWiki::getPubUrl
, and pass parameters like $absolute - just returning the
TWiki::cfg
is way to naive.
--Sven
Just had the same issue a few days ago. Helped myself with the <literal> tag.
-- Oliver
closing, the real change is in a feature request to deprecate context information in building URL's
--
SvenDowideit - 12 Dec 2008