From: W. Trevor King Date: Wed, 13 Oct 2010 21:21:42 +0000 (-0400) Subject: Encode <, >, and & as entities during raw inlines. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a3ab617d7b97dfa8952cd5e47edae5a0af33f24a;p=ikiwiki.git Encode <, >, and & as entities during raw inlines. --- diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index a22440bc6..84bd85ada 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -5,6 +5,7 @@ package IkiWiki::Plugin::inline; use warnings; use strict; use Encode; +use HTML::Entities; use IkiWiki 3.00; use URI; @@ -483,7 +484,7 @@ sub get_inline_content ($$$) { filter($page, $destpage, readfile(srcfile($file)))))); } elsif ($read_raw) { - $ret=readfile(srcfile($file)); + $ret=encode_entities(readfile(srcfile($file)), '<>&'); } $nested--; if (isinternal($page)) {