mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#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:
parent
f7a3e95851
commit
17705be0bc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user