默认PHPCMS V9 9.6.3及向下版本都有这个问题,可在标题位置插入html标签,如a标签,img标签,虽说内容页输出的时候处理过,但这会造成列表页的显示错误。修复方法如下:
/phpcms/model/content_model.class.php里的
add_content 和 edit_content 方法找到
$systeminfo['keywords'] = str_replace(array('/','\\','#','.',"'"),' ',$systeminfo['keywords']);
在下方插入一行:
$systeminfo['title'] = safe_replace($systeminfo['title']);
这样利用safe_replace就可避免这种情况的发生。
本文转载自周涛的个人博客:https://www.zhoutao.org/blog/2020/01/2213.html
发表评论 取消回复