From 05fda0cf1f7b897a89925cacc51d2b8fd98a786d Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 1 Apr 2019 12:27:03 -0700 Subject: [PATCH] Fix for double-encoding in admin logs. --- e107_handlers/e_parse_class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 39cb255b7..13c32ef81 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -574,10 +574,13 @@ class e_parse extends e_parser else // add entities for everything. we want to save the code. { + $search = array('>', '<'); + $replace = array('>', '<'); + $data = str_replace($search, $replace, $data); // prevent &gt; etc. + $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8'); $data = str_replace('\\', '\', $data); - $ret = preg_replace("/&#(\d*?);/", "&#\\1;", $data); }