From ef61d50693dc4e1b828160194436e75cc067f350 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 4 Aug 2012 13:21:56 +0200 Subject: Sync with ikiwiki 3.20120516. --- IkiWiki/Plugin/meta.pm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 220fff9..421f1dc 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -275,17 +275,23 @@ sub preprocess (@) { push @{$metaheaders{$page}}, ''; } - elsif ($key eq 'description') { - push @{$metaheaders{$page}}, ''; } elsif ($key eq 'name') { - push @{$metaheaders{$page}}, scrub('', $page, $destpage); } + elsif ($key eq 'keywords') { + # Make sure the keyword string is safe: only allow alphanumeric + # characters, space and comma and strip the rest. + $value =~ s/[^[:alnum:], ]+//g; + push @{$metaheaders{$page}}, ''; + } else { push @{$metaheaders{$page}}, scrub('