From 1a183c1ad98837077c50fef128b80866c2d5d87d Mon Sep 17 00:00:00 2001 From: Ryan Burgoyne Date: Mon, 25 Feb 2013 13:14:32 -0700 Subject: [PATCH] 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. --- pandoc.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.39.2