From: Ryan Burgoyne Date: Mon, 25 Feb 2013 20:14:32 +0000 (-0700) Subject: Fixed bug that kept the author from being properly stored and used the quotemeta... X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=1a183c1ad98837077c50fef128b80866c2d5d87d;p=ikiwiki-pandoc.git Fixed bug that kept the author from being properly stored and used the quotemeta() function on the final meta values before passing them to pagestate so that special characters will also work. --- diff --git a/pandoc.pm b/pandoc.pm index 17a0013..4df0249 100644 --- a/pandoc.pm +++ b/pandoc.pm @@ -233,7 +233,7 @@ sub htmlize ($@) { my $num_authors = @doc_authors; my @primary_author = (); if ($num_authors gt 0) { - my @primary_author = @{$doc_authors[0]}; + @primary_author = @{$doc_authors[0]}; } my @doc_date = @{$header_section{'docDate'}}; @@ -258,13 +258,13 @@ sub htmlize ($@) { my $date = compile_string @doc_date; if ($title) { - $pagestate{$page}{meta}{title} = $title; + $pagestate{$page}{meta}{title} = quotemeta($title); } if ($author) { - $pagestate{$page}{meta}{author} = $author; + $pagestate{$page}{meta}{author} = quotemeta($author); } if ($date) { - $pagestate{$page}{meta}{date} = $date; + $pagestate{$page}{meta}{date} = quotemeta($date); } return $content;