diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-23 21:21:31 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-23 21:21:31 +0000 |
commit | 4155fd3c964ad28a1eb2ca945ccca35f9deee568 (patch) | |
tree | 452c99cf4ba134573eeee75108e47c6e2d21b838 /IkiWiki | |
parent | 801a6d61b9abbbcd6052f838f2e099015c12d10b (diff) | |
download | ikiwiki-4155fd3c964ad28a1eb2ca945ccca35f9deee568.tar ikiwiki-4155fd3c964ad28a1eb2ca945ccca35f9deee568.tar.gz |
fix for already relative urls
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Render.pm | 8 |
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; } #}}} |