X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/ce70d375a451eb11f257e310f834972d2e432e82..c3805557f183a9ad628b58a06e64269a4982f6d6:/IkiWiki/Plugin/mdwn.pm diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index ca8898679..254ab51d0 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -43,9 +43,11 @@ sub htmlize (@) { #{{{ # Workaround for perl bug (#376329) $content=Encode::encode_utf8($content); - $content=Encode::encode_utf8($content); - $content=&$markdown_sub($content); - $content=Encode::decode_utf8($content); + eval {$content=&$markdown_sub($content)}; + if ($@) { + eval {$content=&$markdown_sub($content)}; + print STDERR $@ if $@; + } $content=Encode::decode_utf8($content); return $content;