From eac813158ae238c143b6b78bd28793b81118e016 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 13 Oct 2010 17:21:42 -0400 Subject: [PATCH] Encode <, >, and & as entities during raw inlines. --- IkiWiki/Plugin/inline.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 7537ae4ba..e23ba316d 100755 --- 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; @@ -531,7 +532,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)) { -- 2.26.2