HTML Tidy fixes: UTF-8, preserving whitespace, keep attributes literal, don't wrap text
This commit is contained in:
parent
8144e517e9
commit
471525a58b
@ -1734,11 +1734,17 @@ function markup(&$body, $track_cites = false) {
|
|||||||
|
|
||||||
if ($config['markup_repair_tidy']) {
|
if ($config['markup_repair_tidy']) {
|
||||||
$tidy = new tidy();
|
$tidy = new tidy();
|
||||||
$body = $tidy->repairString($body, array(
|
$body = $tidy->repairString(str_replace(' ', ' ', $body), array(
|
||||||
'doctype' => 'omit'
|
'doctype' => 'omit',
|
||||||
));
|
'bare' => true,
|
||||||
|
'literal-attributes' => true,
|
||||||
|
'quote-nbsp' => true,
|
||||||
|
'indent' => false,
|
||||||
|
'show-body-only' => true,
|
||||||
|
'wrap' => 0,
|
||||||
|
'output-bom' => false,
|
||||||
|
), 'utf8');
|
||||||
$body = str_replace("\n", '', $body);
|
$body = str_replace("\n", '', $body);
|
||||||
$body = preg_replace('@^.+<body>|</body>.+$@', '', $body);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $tracked_cites;
|
return $tracked_cites;
|
||||||
|
Loading…
Reference in New Issue
Block a user