Merge pull request #9948 from open-sausages/4

FIX Tidy extension and cli fix for tests
This commit is contained in:
Dylan Wagstaff 2021-05-21 09:19:22 +12:00 committed by GitHub
commit a5fc61a23a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ class CSSContentParser
[
'output-xhtml' => true,
'numeric-entities' => true,
'wrap' => 0, // We need this to be consistent for functional test string comparisons
'wrap' => 99999, // We need this to be consistent for functional test string comparisons
],
'utf8'
);
@ -48,7 +48,7 @@ class CSSContentParser
} elseif (@shell_exec('which tidy')) {
// using tiny through cli
$CLI_content = escapeshellarg($content);
$tidy = `echo $CLI_content | tidy --force-output 1 -n -q -utf8 -asxhtml -w 0 2> /dev/null`;
$tidy = `echo $CLI_content | tidy --force-output 1 -n -q -utf8 -asxhtml -w 99999 2> /dev/null`;
$tidy = str_replace('xmlns="http://www.w3.org/1999/xhtml"', '', $tidy);
$tidy = str_replace(' ', '', $tidy);
} else {