From bad5072c02d506b5b5a0d74cd60639f7f62cc7d3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 30 Apr 2011 16:30:07 -0400 Subject: [PATCH] tag: Avoid autocreating multiple tag pages that vary only in capitalization. The first capitalization seen of a tag will be used for the tag page. Arguably, the real bug is in the interface to add_autofile, but since that does take a filename, not a page name, it cannot really do case handling on its own. The only other users of add_autofile in ikiwiki proper is autoindex, and it always uses one case. Other third party plugins might also need to add similar workarounds though. --- IkiWiki/Plugin/tag.pm | 3 +++ debian/changelog | 3 +++ 2 files changed, 6 insertions(+) diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 13dabce0c..ca74fef90 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -104,6 +104,9 @@ sub gentag ($) { else { $tagpage=~s/^\///; } + if (exists $IkiWiki::pagecase{lc $tagpage}) { + $tagpage=$IkiWiki::pagecase{lc $tagpage} + } my $tagfile = newpagefile($tagpage, $config{default_pageext}); diff --git a/debian/changelog b/debian/changelog index f37ebcf97..07b1161fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ ikiwiki (3.20110329) UNRELEASED; urgency=low * Be quiet about updating wrappers, except in verbose mode. (jmtd) * meta: Add FOAF support. Closes: #623156 (Jonas Smedegaard) * Promote Crypt::SSLeay to Recommends; needed for https openid auth. + * tag: Avoid autocreating multiple tag pages that vary only in + capitalization. The first capitalization seen of a tag will be used + for the tag page. -- Joey Hess Mon, 28 Mar 2011 13:08:23 -0400 -- 2.39.5