* Make the url absolution code for feeds significantly more robust.
parent
aadb214220
commit
d9a3c2bed2
|
@ -302,9 +302,9 @@ sub absolute_urls ($$) { #{{{
|
|||
my $url=$baseurl;
|
||||
$url=~s/[^\/]+$//;
|
||||
|
||||
$content=~s/(<a(?:\s+(?:class|id)="?\w+"?)?)\s+href="(#[^"]+)"/$1 href="$baseurl$2"/ig;
|
||||
$content=~s/(<a(?:\s+(?:class|id)="?\w+"?)?)\s+href="(?!\w+:\/\/)([^"]+)"/$1 href="$url$2"/ig;
|
||||
$content=~s/(<img(?:\s+(?:class|id)="?\w+"?)?)\s+src="(?!\w+:\/\/)([^"]+)"/$1 src="$url$2"/ig;
|
||||
$content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(#[^"]+)"/$1 href="$baseurl$2"/mig;
|
||||
$content=~s/(<a(?:\s+(?:class|id)\s*="?\w+"?)?)\s+href=\s*"(?!\w+:\/\/)([^"]+)"/$1 href="$url$2"/mig;
|
||||
$content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"(?!\w+:\/\/)([^"]+)"/$1 src="$url$2"/mig;
|
||||
return $content;
|
||||
} #}}}
|
||||
|
||||
|
|
|
@ -34,8 +34,9 @@ ikiwiki (2.2) UNRELEASED; urgency=low
|
|||
* Add test suite for preprocessor directive parsing.
|
||||
* Fix wrapper generator and untaint code's handling of strings contining
|
||||
newlines.
|
||||
* Make the url absolution code for feeds significantly more robust.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sun, 03 Jun 2007 12:20:26 -0400
|
||||
-- Joey Hess <joeyh@debian.org> Sun, 03 Jun 2007 13:10:08 -0400
|
||||
|
||||
ikiwiki (2.1) unstable; urgency=low
|
||||
|
||||
|
|
Loading…
Reference in New Issue