Skip to content

Commit

Permalink
Fix [[!meta name=foo]] by closing the open quote.
Browse files Browse the repository at this point in the history
  • Loading branch information
schmonz committed Aug 23, 2015
1 parent 69f8b64 commit 09916a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions IkiWiki/Plugin/meta.pm
Expand Up @@ -294,6 +294,7 @@ sub preprocess (@) {
elsif ($key eq 'name') {
push @{$metaheaders{$page}}, scrub('<meta name="'.
encode_entities($value).
'" '.
join(' ', map { "$_=\"$params{$_}\"" } keys %params).
' />', $page, $destpage);
}
Expand Down
23 changes: 11 additions & 12 deletions t/meta.t
Expand Up @@ -125,12 +125,11 @@ write_build_read_compare(
# qr{<link href="http://wonka\.link\.example" />},
#);

# XXX buggy? is this my bug? maybe twitter:foo would just work if this worked
#write_build_read_compare(
# 'name',
# q{[[!meta name="thingy" value1="hi" value2="hello"]]},
# qr{<meta name="thingy" value1="hi" value2="hello" />},
#);
write_build_read_compare(
'name',
q{[[!meta name="thingy" value1="hi" value2="hello"]]},
qr{<meta name="thingy" value[0-9]{1}=".+?" value[0-9]{1}=".+?" />},
);

write_build_read_compare(
'keywords',
Expand All @@ -149,11 +148,11 @@ write_build_read_compare(
# '[[!meta twitter:card="player"]]',
# qr{<meta name="twitter:card" content="player" />},
#);
#
#write_build_read_compare(
# 'twittercard2',
# '[[!meta name="twitter:card" content="player"]]',
# qr{<meta name="twitter:card" content="player" />},
#);

write_build_read_compare(
'twittercard2',
'[[!meta name="twitter:card" content="player"]]',
qr{<meta name="twitter:card" content="player" />},
);

done_testing();

0 comments on commit 09916a9

Please sign in to comment.