问答 / 1041 / 5 / 创建于 5年前 / 更新于 5年前
比如说reply_content这里,我不需要那个p标签
把标签去掉呗, php 有这个方法,google 一下
@liyu001989 抱歉没表述清楚。。。我想知道这个标签是从哪来的,我看到有些字段会添加这个标签有些不会。
研究一下富文本编辑器,你看看提交过来的数据。段落,换行都会加个 p 吧
@liyu001989 了解了,之前没注意到这个问题。灰常感谢
content 字段有标签是因为 Reply 模型 store 的时候设置了触发模型事件。在模型事件了调用了封装的 helpers 来处理 xss 攻击。
class ReplyObserver { public function creating(Reply $reply) { $reply->content = clean($reply->content, 'user_topic_body'); } …… }
我要举报该,理由是:
推荐文章: