X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4250d389d3ebf3821ac3bdafc04d24ed0e2a6a64..95a8b8868f1bbf73a9b8a4f36c5e21c2fcd0141b:/IkiWiki/Plugin/meta.pm
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 9b7b9854f..b19ea2b32 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -275,22 +275,23 @@ sub preprocess (@) {
push @{$metaheaders{$page}}, '';
}
- elsif ($key eq 'author') {
- 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('