X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/88e8f0ced96c65c7a04f95eb5aa72679937593c9..55d1fbb9558b04f1d688648fc54944b1e7f13295:/IkiWiki/Plugin/meta.pm?ds=inline
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 28b1a1ad6..7ea70b5d1 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -107,12 +107,12 @@ sub preprocess (@) {
# fallthrough
}
elsif ($key eq 'license') {
- push @{$metaheaders{$page}}, '';
+ push @{$metaheaders{$page}}, '';
$pagestate{$page}{meta}{license}=$value;
return "";
}
elsif ($key eq 'copyright') {
- push @{$metaheaders{$page}}, '';
+ push @{$metaheaders{$page}}, '';
$pagestate{$page}{meta}{copyright}=$value;
return "";
}
@@ -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('