有人可以通过整理来帮助确定问题吗?
下一行:
<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更改?提前谢谢。
答案 0 :(得分:0)
$ tidy-&GT; cleanRepair(); - 这里不需要