Merge pull request #3468 from halkyon/tidy_fixes

BUG CSSContentParser fails if CLI tidy doesn't output anything.
This commit is contained in:
Stig Lindqvist 2014-09-04 11:15:39 +12:00
commit 5168fadbe0

View File

@ -41,7 +41,7 @@ class CSSContentParser extends Object {
} elseif(@shell_exec('which tidy')) {
// using tiny through cli
$CLI_content = escapeshellarg($content);
$tidy = `echo $CLI_content | tidy -n -q -utf8 -asxhtml -w 0 2> /dev/null`;
$tidy = `echo $CLI_content | tidy --force-output 1 -n -q -utf8 -asxhtml -w 0 2> /dev/null`;
$tidy = str_replace('xmlns="http://www.w3.org/1999/xhtml"','',$tidy);
$tidy = str_replace(' ','',$tidy);
} else {