summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/inline.pm6
-rw-r--r--debian/changelog3
2 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index e23f7b903..67aaa817e 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -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;
} #}}}
diff --git a/debian/changelog b/debian/changelog
index dd7f509b3..9c558b33e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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