科站网 發表於 2022-12-9 13:58:37

修复Discuz附件&转义为&

问题现象<br /><img title="QQ截图20221209135556.jpg" id="aimg_17896" aid="17896" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202212/09/135604u3k30aj1mcobox0o.jpg" src="https://www.dismall.com/data/attachment/forum/202212/09/135604u3k30aj1mcobox0o.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br />修复方法:<br />1.template/default/forum/ajax_attachlist.htm<br />搜索<br /><ol><li>{$attach}</ol><br />改为<br /><br /><br />2.source/function/function_post.php<br />搜索<br /><ol><li>$attach['filenametitle'] = $attach['filename'];</ol><br />在下面加入<br /><br /><br />3.source/function/function_attachment.php<br />搜索<br /><ol><li>$attached = 0;</ol><br />在下面加入<br /><br /><br />amp<em>, </em>修复<em>, </em>问题<em>, </em>现象<em>, </em>方法

Jugaad 發表於 2022-12-9 15:15:56

楼主威武呀

龙二哥 發表於 2022-12-9 16:18:47

赞一个。

magicblue 發表於 2022-12-11 13:00:54

试试hhh哈哈哈

strawberry 發表於 2023-1-1 18:19:28

试一下&nbsp; &nbsp;&nbsp; &nbsp;

jiangchuankyo 發表於 2023-1-1 18:31:48

<ol><li>&amp;应该转成&amp;amp;的, 如果不转的话, 别人写&amp;21535;&amp;25632;这类字符, 你会发现浏览器的显示会变成不是它, 这样会绕过关键词过滤, <br /><li><br /><li>discuz出现的问题是它把&amp;转了2次, 转成了&amp;amp;amp;</ol>

jiangchuankyo 發表於 2023-1-1 18:33:10

<br />入库写的时候转了一次,&nbsp;&nbsp;出库读出来后又不加判断的转了一次

pcinstall 發表於 2023-1-1 20:35:33

kk看看

czwhehehe 發表於 2023-1-2 08:58:52

的确有这个问题

qzusersss 發表於 2023-1-7 10:39:47

正好需要的
頁: [1]
查看完整版本: 修复Discuz附件&转义为&amp;