X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/88e8f0ced96c65c7a04f95eb5aa72679937593c9..10b6cb6ee5b8b6b81456a5a781216b4b2ec86e52:/IkiWiki/Plugin/meta.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 28b1a1ad6..421f1dc86 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -285,6 +285,13 @@ sub preprocess (@) { join(' ', map { "$_=\"$params{$_}\"" } keys %params). ' />', $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('