summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-23 21:21:31 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-23 21:21:31 +0000
commit4155fd3c964ad28a1eb2ca945ccca35f9deee568 (patch)
tree452c99cf4ba134573eeee75108e47c6e2d21b838 /IkiWiki
parent801a6d61b9abbbcd6052f838f2e099015c12d10b (diff)
fix for already relative urls
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Render.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 1c56677ba..1ac85be44 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -139,12 +139,8 @@ sub absolute_urls ($$) { #{{{
$url=~s/[^\/]+$//;
- $content=~s{<a\s+href="([^"]+)"}{
- "<a href=\"$url$1\""
- }ieg;
- $content=~s{<img\s+src="([^"]+)"}{
- "<img src=\"$url$1\""
- }ieg;
+ $content=~s/<a\s+href="(?!http:\/\/)([^"]+)"/<a href="$url$1"/ig;
+ $content=~s/<img\s+src="(?!http:\/\/)([^"]+)"/<img src="$url$1"/ig;
return $content;
} #}}}