PHP 整洁 'u'-标签被 'span' 取代
PHP Tidy 'u'-tag is replaced by 'span'
谁能帮忙找出 tidy 的问题?
下一行:
<p><u>Risk Warning</u><br />Please note that...</p>
之后:
$config = array(
'clean' => true,
'doctype' => '<!DOCTYPE HTML>',
'drop-proprietary-attributes' => true,
'output-xhtml' => true,
'show-body-only' => true,
'drop-font-tags' => false,
'merge-spans' => true,
'wrap' => '0',
'ascii-chars' => false,
'char-encoding' => 'utf8',
'input-encoding' => 'utf8',
'output-encoding' => 'utf8'
);
$tidy = new \tidy();
$tidy->parseString($text, $config, 'utf8');
$tidy->cleanRepair();
echo tidy_get_output($tidy);
被替换为:
<p><span class="c1">Risk Warning</span><br />Please note that...</p>
如何防止 'u'-tag 更改?提前致谢。
$tidy->cleanRepair(); - 这里不需要
谁能帮忙找出 tidy 的问题?
下一行:
<p><u>Risk Warning</u><br />Please note that...</p>
之后:
$config = array(
'clean' => true,
'doctype' => '<!DOCTYPE HTML>',
'drop-proprietary-attributes' => true,
'output-xhtml' => true,
'show-body-only' => true,
'drop-font-tags' => false,
'merge-spans' => true,
'wrap' => '0',
'ascii-chars' => false,
'char-encoding' => 'utf8',
'input-encoding' => 'utf8',
'output-encoding' => 'utf8'
);
$tidy = new \tidy();
$tidy->parseString($text, $config, 'utf8');
$tidy->cleanRepair();
echo tidy_get_output($tidy);
被替换为:
<p><span class="c1">Risk Warning</span><br />Please note that...</p>
如何防止 'u'-tag 更改?提前致谢。
$tidy->cleanRepair(); - 这里不需要