你如何确保WYSIWYG编辑器的安全? [英] How do you secure a WYSIWYG editor?

查看:75
本文介绍了你如何确保WYSIWYG编辑器的安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用tinyMCE为我的

网站的用户提供格式化文本区域。如何过滤那么复杂的数据?

I use tinyMCE to provide a formattable textarea for the users of my
website. How do I filter data so complex as that?

推荐答案

文章< vl ************** ******************@4ax.com> ;,

< fi ********* @ yahoo.comwrote:
In article <vl********************************@4ax.com>,
<fi*********@yahoo.comwrote:

>我使用tinyMCE为我的
网站的用户提供格式化文本区域。如何过滤那么复杂的数据?
>I use tinyMCE to provide a formattable textarea for the users of my
website. How do I filter data so complex as that?



你想过滤什么?使用TinyMCE,您可以控制用户放入文本的

功能。如果用户试图

插入一些你不允许的HTML标签(使用任何regexp

函数或stristri()),只需警告用户并重新显示

文本直到用户修复它。


-A

What do you want to filter? With TinyMCE you can control the
features that a user puts into the text. If the user tries to
insert some HTML tags you don''t allow (use any of the regexp
functions or stristri()), simply warn the user and redisplay the
text until the user fixes it.

-A


fi ********* @ yahoo.com 写道:

我使用tinyMCE为我的

网站的用户提供formattable textarea。如何过滤那么复杂的数据?
I use tinyMCE to provide a formattable textarea for the users of my
website. How do I filter data so complex as that?



你的意思是为SQL清理它?

基本上,tinyMCE似乎只输出一个html字符串,我什么也看不见

特别喜欢它,你不应该比平常更担心它。


-thib'

You mean sanitize it for SQL?
Basically, tinyMCE seems to output only a html string, I don''t see anything
special with it, you shouldn''t worry more than usual about it.

-thib′


最重要的是你可以使用strip_tags(
Ont top of that you can use strip_tags(


这篇关于你如何确保WYSIWYG编辑器的安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆