projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
801a6d6
)
fix for already relative urls
author
joey
<joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 23 Mar 2006 21:21:31 +0000
(21:21 +0000)
committer
joey
<joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 23 Mar 2006 21:21:31 +0000
(21:21 +0000)
IkiWiki/Render.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Render.pm
b/IkiWiki/Render.pm
index 1c56677ba162ed87f7da802a17612959a126878a..1ac85be44dad722e1588000fde059d420a433659 100644
(file)
--- 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;
} #}}}