fix for already relative urls
parent
801a6d61b9
commit
4155fd3c96
|
@ -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;
|
||||
} #}}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue