评论输入框改为百度编辑器以后,输入内容提交,html标签会被转义掉。
控件代码里取消了xss过滤还是不行。这是代码,帮忙看下如何设置修改。
<?php echo str_replace("data[content]", "content",dr_fieldform('{"name":"简单编辑器","fieldname":"content","ismain":"1","fieldtype":"Ueditor","setting":{"option":{"down_img":"1","watermark":"0","show_bottom_boot":"0","autofloat":"0","remove_style":"0","div2p":"0","autoheight":"0","page":"0","mode":"1","tool":"\'bold\', \'italic\', \'underline\'","mode2":"3","tool2":"\'bold\', \'forecolor\', \'link\', \'simpleupload\', \'underline\', \'source\', \'blockquote\'","mode3":"1","tool3":"\'bold\', \'italic\', \'underline\'","attachment":"0","image_reduce":"","value":"","width":"100%","height":"300","css":""},"validate":{"required":"0","pattern":"","errortips":"","xss":"1","check":"","filter":"","formattr":"","tips":""}},"ismember":"1"}', ""));?>
插件版权:官方插件
插件名称:评论
{dr_replace_emotion($t.content)}{dr_replace_emotion(dr_code2html($t.content))}提交之后显示的评论内容为这样:
也就是 < >都没有了,只留下了其他的。评论内容输入框的代码为:
<?php echo str_replace("data[content]", "content",dr_fieldform('{"name":"简单编辑器","fieldname":"content","ismain":"1","fieldtype":"Ueditor","setting":{"option":{"down_img":"1","watermark":"0","show_bottom_boot":"0","autofloat":"0","remove_style":"0","div2p":"0","autoheight":"0","page":"0","mode":"1","tool":"\'bold\', \'italic\', \'underline\'","mode2":"3","tool2":"\'bold\', \'forecolor\', \'link\', \'simpleupload\', \'underline\', \'source\', \'blockquote\'","mode3":"1","tool3":"\'bold\', \'italic\', \'underline\'","attachment":"0","image_reduce":"","value":"","width":"100%","height":"300","css":""},"validate":{"required":"0","pattern":"","errortips":"","xss":"1","check":"","filter":"","formattr":"","tips":""}},"ismember":"1"}', ""));?>评论内容显示的代码按上述已修改为;<div class="ds-comment-body"> <p> {dr_replace_emotion(dr_code2html($t.content))} </p> <div class="ds-replybox ds-replybox2 ds-inline-replybox " id="dr_reply_{$t.id}" style="display:none;"> </div> </div>{dr_code2html($t.content)}