From c5919df5f3697e0f8968e2b8f49cd15c1e0aa412 Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 4 Aug 2006 00:01:51 +0000 Subject: * Make aggregator save permalinks and author name to pages as metadata. * Add permalink and author support to meta plugin, affecting RSS feeds and blog pages. * Change titlepage() to encode utf-8 alnum characters. This is necessary to avoid UTF-8 creeping into filenames in urls. (There are still some other ways that it can get in.) --- IkiWiki.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index a732be999..1a5cf52dd 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -272,7 +272,9 @@ sub pagetitle ($) { #{{{ sub titlepage ($) { #{{{ my $title=shift; $title=~y/ /_/; - $title=~s/([^-[:alnum:]_:+\/.])/"__".ord($1)."__"/eg; + # Note: [:alnum:] is not used here, on purpose; unicode + # not allowed in urls. + $title=~s/([^-A-Za-z0-9_:+\/.])/"__".ord($1)."__"/eg; return $title; } #}}} -- cgit v1.2.3