summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authormartin f. krafft <madduck@madduck.net>2008-03-02 15:51:31 +0100
committerJoey Hess <joey@kodama.kitenet.net>2008-03-02 18:04:09 -0500
commitc10cfb27d1e15eb3d69923e8aae9e84f3f14926a (patch)
tree28c16993eb81a69d4fb70ab374016284d01886d9 /IkiWiki/Plugin
parenta8f08ab8e18877dd023430fc8926530244c74771 (diff)
Add robots tag to meta plugin
Add special handling for <meta name="robots" ...> which needs not be scrubbed as it's harmless. Signed-off-by: martin f. krafft <madduck@madduck.net> (cherry picked from commit b15d0299a7f7b147e89d8a202d6cca1c21491af2)
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/meta.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 74b630afc..2df5a727c 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -193,6 +193,10 @@ sub preprocess (@) { #{{{
" />\n");
}
}
+ elsif ($key eq 'robots') {
+ push @{$metaheaders{$page}}, '<meta name="robots"'.
+ ' value="'.encode_entities($value).'" />';
+ }
else {
push @{$metaheaders{$page}}, scrub('<meta name="'.encode_entities($key).
'" content="'.encode_entities($value).'" />');