From: Joey Hess <joey@kodama.kitenet.net> Date: Sun, 24 Feb 2008 22:07:56 +0000 (-0500) Subject: * inline: When forcing urls absolute for rss feeds, skip mailto and other X-Git-Tag: 2.40~52 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/4eabb3cb7a1a7c9af3232e8e8713e00a2d5dd861?hp=-c * inline: When forcing urls absolute for rss feeds, skip mailto and other such urls. --- 4eabb3cb7a1a7c9af3232e8e8713e00a2d5dd861 diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index b43530eb8..f4a20e489 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -362,8 +362,8 @@ sub absolute_urls ($$) { #{{{ $url=~s/[^\/]+$//; $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; + $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 f0ca4c754..73c872434 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,6 +47,8 @@ ikiwiki (2.40) UNRELEASED; urgency=low * Disable taint checking for all builds as people keep complaining about it, and since all versions of perl seem to be hopelessly broken. * Fix links generated by preprocessor directives when previewing. + * inline: When forcing urls absolute for rss feeds, skip mailto and other + such urls. -- Josh Triplett <josh@freedesktop.org> Sun, 10 Feb 2008 13:18:58 -0800 diff --git a/doc/bugs/mailto:_links_not_properly_generated_in_rssatom_feeds.mdwn b/doc/bugs/mailto:_links_not_properly_generated_in_rssatom_feeds.mdwn index b2144cad4..5d6c6ad6d 100644 --- a/doc/bugs/mailto:_links_not_properly_generated_in_rssatom_feeds.mdwn +++ b/doc/bugs/mailto:_links_not_properly_generated_in_rssatom_feeds.mdwn @@ -1,3 +1,5 @@ [[meta title="mailto: links not properly generated in rss/atom feeds"]] A link like \[this](mailto:foo@bar.org) will not be converted correctly to a mailto link in the rss/atom feeds, but an absolute link instead. See e.g. the logitech post on http://madduck.net/blog/feeds/planet-lca2008/index.rss + +> fixed --[[Joey]] [[tag done]]