#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
This commit is contained in:
Sam Minnee 2008-10-25 06:05:27 +00:00
parent f7a3e95851
commit 17705be0bc

View File

@ -347,8 +347,9 @@ class Convert extends Object {
// Replace HTML entities
$data = preg_replace("/&#([0-9]+);/e", 'chr(\1)', $data);
$data = str_replace(array("&lt;","&gt;","&amp;","&nbsp;"), array("<", ">", "&", " "), $data);
//$data = preg_replace("/&#([0-9]+);/e", 'chr(\1)', $data);
//$data = str_replace(array("&lt;","&gt;","&amp;","&nbsp;"), 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