php 怎么去除编辑器提交的空白字符
就像这样的空白字符:
- HTML code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->
<p> </p><div class="aritcle_card flexRow">
<div class="artcardd flexRow">
<a class="aritcle_card_img" href="/ai/2040" title="笔头写作"><img
src="https://img.php.cn/upload/ai_manual/000/000/000/175680175114309.png" alt="笔头写作" onerror="this.onerror='';this.src='/static/lhimages/moren/morentu.png'" ></a>
<div class="aritcle_card_info flexColumn">
<a href="/ai/2040" title="笔头写作">笔头写作</a>
<p>AI为论文写作赋能,协助你从0到1。</p>
</div>
<a href="/ai/2040" title="笔头写作" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a>
</div>
</div>
------解决方案--------------------
还原为实体是这样:
,再替换
------解决方案--------------------
上个回答错了,被#2误导了,应该这样:
- PHP code
$str = '<p> </p>'; $result = htmlspecialchars_decode($str); <br><font color="#e78608">------解决方案--------------------</font><br>










