simplify
authorJoey Hess <joey@kitenet.net>
Mon, 26 Mar 2012 15:05:03 +0000 (11:05 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 27 Mar 2012 19:52:35 +0000 (15:52 -0400)
IkiWiki/Plugin/meta.pm

index 9b7b9854ffa504e17c65f8c83abc302eaf4dfa81..28b1a1ad6e69624791492a8582dce79360acee89 100644 (file)
@@ -275,18 +275,12 @@ sub preprocess (@) {
                push @{$metaheaders{$page}}, '<meta name="robots"'.
                        ' content="'.encode_entities($value).'" />';
        }
-       elsif ($key eq 'author') {
-               push @{$metaheaders{$page}}, '<meta name="'.
-                       encode_entities($key).
-                       '" content="'.encode_entities($value).'" />';
-       }
-       elsif ($key eq 'description') {
-               push @{$metaheaders{$page}}, '<meta name="'.
-                       encode_entities($key).
+       elsif ($key eq 'description' || $key eq 'author') {
+               push @{$metaheaders{$page}}, '<meta name="'.$key.
                        '" content="'.encode_entities($value).'" />';
        }
        elsif ($key eq 'name') {
-               push @{$metaheaders{$page}}, scrub('<meta '.$key.'="'.
+               push @{$metaheaders{$page}}, scrub('<meta name="'.
                        encode_entities($value).
                        join(' ', map { "$_=\"$params{$_}\"" } keys %params).
                        ' />', $page, $destpage);