Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 35378e577e5f8d65b5d92490752695456de2cc9f 1 parent 077a119
@sminnee sminnee authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  dev/CSSContentParser.php
View
3  dev/CSSContentParser.php
@@ -34,6 +34,7 @@ function __construct($content) {
$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 @@ function __construct($content) {
$tidy = $content;
}
- $this->simpleXML = new SimpleXMLElement($tidy);
+ $this->simpleXML = simplexml_load_string($tidy, 'SimpleXMLElement', LIBXML_NOWARNING);
parent::__construct();
}
Please sign in to comment.
Something went wrong with that request. Please try again.