summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-04-30 16:30:07 -0400
committerJoey Hess <joey@kitenet.net>2011-04-30 16:30:07 -0400
commitbad5072c02d506b5b5a0d74cd60639f7f62cc7d3 (patch)
tree92c9e8a86fd2aba9bf7327205d543785a13434c7
parent272961d7ff952ba1e1c593c74e6b2b805fa53e77 (diff)
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.
-rw-r--r--IkiWiki/Plugin/tag.pm3
-rw-r--r--debian/changelog3
2 files changed, 6 insertions, 0 deletions
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 <joeyh@debian.org> Mon, 28 Mar 2011 13:08:23 -0400