]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
* Make the url absolution code for feeds significantly more robust.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 3 Jun 2007 17:10:32 +0000 (17:10 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 3 Jun 2007 17:10:32 +0000 (17:10 +0000)
IkiWiki/Plugin/inline.pm
debian/changelog

index e23f7b9036949fef04f840eb9a6d49f61d704bc7..67aaa817e5b1832045e3a0fbac7c517beb5ad12f 100644 (file)
@@ -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;
 } #}}}
 
index dd7f509b387fb07f038a452f430978df8c80a08a..9c558b33ee0b78b0feede54f2c55893cbb04dd05 100644 (file)
@@ -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