mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX CSSContentParser now reports better errors by using simplexml_load_string() instead of SimpleXMLElement directly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103552 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7ae748a40f
commit
f92e9d42ac
@ -34,6 +34,7 @@ class CSSContentParser extends Object {
|
||||
$tidy->cleanRepair();
|
||||
$tidy = str_replace('xmlns="http://www.w3.org/1999/xhtml"','',$tidy);
|
||||
$tidy = str_replace(' ','',$tidy);
|
||||
|
||||
} elseif(@shell_exec('which tidy')) {
|
||||
// using tiny through cli
|
||||
$CLI_content = escapeshellarg($content);
|
||||
@ -45,7 +46,7 @@ class CSSContentParser extends Object {
|
||||
$tidy = $content;
|
||||
}
|
||||
|
||||
$this->simpleXML = new SimpleXMLElement($tidy);
|
||||
$this->simpleXML = simplexml_load_string($tidy, 'SimpleXMLElement', LIBXML_NOWARNING);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user