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); }