summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-02-24 17:07:56 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-02-24 17:07:56 -0500
commit4eabb3cb7a1a7c9af3232e8e8713e00a2d5dd861 (patch)
tree8567d2271c0938d80012079f67622658b25a5bfc
parent8e2aae2b35605feb1219229bb3ad19802c6ec47b (diff)
* inline: When forcing urls absolute for rss feeds, skip mailto and other
such urls.
-rw-r--r--IkiWiki/Plugin/inline.pm4
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/mailto:_links_not_properly_generated_in_rssatom_feeds.mdwn2
3 files changed, 6 insertions, 2 deletions
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]]