aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-07-29 12:54:30 +0200
committerJoey Hess <joey@kitenet.net>2011-07-29 12:54:30 +0200
commited360d045a070569cd7bf3f9518c107b1e851cdb (patch)
treea788395317cb904d57415e0af382004d46ddf5ae
parent65a7bc4e06efdbc5eac4b5b8fe76eb0344fcab3f (diff)
downloadikiwiki-ed360d045a070569cd7bf3f9518c107b1e851cdb.tar
ikiwiki-ed360d045a070569cd7bf3f9518c107b1e851cdb.tar.gz
Fix escaping of html entities in tag names.
Example case was a tag with & in its name, which resulted in a malformed rss feed.
-rw-r--r--IkiWiki/Plugin/tag.pm6
-rw-r--r--debian/changelog1
2 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm
index ca74fef90..096c92616 100644
--- a/IkiWiki/Plugin/tag.pm
+++ b/IkiWiki/Plugin/tag.pm
@@ -199,8 +199,10 @@ sub pagetemplate (@) {
if ($template->query(name => "categories")) {
# It's an rss/atom template. Add any categories.
if (defined $tags && %$tags) {
- $template->param(categories => [map { category => tagname($_) },
- sort keys %$tags]);
+ eval q{use HTML::Entities};
+ $template->param(categories =>
+ [map { category => HTML::Entities::encode_entities(tagname($_)) },
+ sort keys %$tags]);
}
}
}
diff --git a/debian/changelog b/debian/changelog
index 20c5d20c7..66389f3fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ ikiwiki (3.20110716) UNRELEASED; urgency=low
* Fix typo in Danish translation of shortcuts page that caused expoentional
regexp blowup.
* Fix escaping of html entities in permalinks.
+ * Fix escaping of html entities in tag names.
-- Joey Hess <joeyh@debian.org> Tue, 19 Jul 2011 11:22:52 -0400