From 17705be0bcebeaf66abc6f3efe6958a834613852 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 25 Oct 2008 06:05:27 +0000 Subject: [PATCH] #2957 - Fixed entity decoding in Convert::html2raw git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64768 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/Convert.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/Convert.php b/core/Convert.php index ef526e50f..e80cceaaf 100755 --- a/core/Convert.php +++ b/core/Convert.php @@ -347,8 +347,9 @@ class Convert extends Object { // Replace HTML entities - $data = preg_replace("/&#([0-9]+);/e", 'chr(\1)', $data); - $data = str_replace(array("<",">","&"," "), array("<", ">", "&", " "), $data); + //$data = preg_replace("/&#([0-9]+);/e", 'chr(\1)', $data); + //$data = str_replace(array("<",">","&"," "), array("<", ">", "&", " "), $data); + $data = html_entity_decode($data, ENT_COMPAT , 'UTF-8'); // Remove all tags (but optionally keep links) // strip_tags seemed to be restricting the length of the output