From a3ab617d7b97dfa8952cd5e47edae5a0af33f24a 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 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)) { -- 2.26.2