[英]PHP Tidy 'u'-tag is replaced by 'span'
有人可以幫忙找出問題所在嗎?
下一行:
<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”標簽更改? 提前致謝。
$ tidy-> cleanRepair(); -這里不需要
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.