* inline: When forcing urls absolute for rss feeds, skip mailto and other

such urls.
master
Joey Hess 2008-02-24 17:07:56 -05:00
parent 8e2aae2b35
commit 4eabb3cb7a
3 changed files with 6 additions and 2 deletions

View File

@ -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;
} #}}}

2
debian/changelog vendored
View File

@ -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

View File

@ -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]]