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