diff options
-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; } #}}} |