mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
HTML Tidy bug fix: broken attributes, and preserve whitespace properly
This commit is contained in:
parent
471525a58b
commit
738179c766
@ -1556,6 +1556,9 @@ function markup(&$body, $track_cites = false) {
|
||||
error($config['error']['toomanylinks']);
|
||||
}
|
||||
|
||||
if ($config['markup_repair_tidy'])
|
||||
$body = str_replace(' ', ' ', $body);
|
||||
|
||||
if ($config['auto_unicode']) {
|
||||
$body = unicodify($body);
|
||||
|
||||
@ -1734,15 +1737,18 @@ function markup(&$body, $track_cites = false) {
|
||||
|
||||
if ($config['markup_repair_tidy']) {
|
||||
$tidy = new tidy();
|
||||
$body = $tidy->repairString(str_replace(' ', ' ', $body), array(
|
||||
$body = $tidy->repairString($body, array(
|
||||
'doctype' => 'omit',
|
||||
'bare' => true,
|
||||
'literal-attributes' => true,
|
||||
'quote-nbsp' => true,
|
||||
'indent' => false,
|
||||
'show-body-only' => true,
|
||||
'wrap' => 0,
|
||||
'output-bom' => false,
|
||||
'output-html' => true,
|
||||
'newline' => 'LF',
|
||||
'quiet' => true,
|
||||
|
||||
), 'utf8');
|
||||
$body = str_replace("\n", '', $body);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user