TinyMCE安全问题:如何防止恶意输入? [英] TinyMCE security question: How do you prevent malicious input?
本文介绍了TinyMCE安全问题:如何防止恶意输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何防止在所见即所得的编辑器(例如TinyMCE)中的恶意输入?
How do you prevent malicious input in WYSIWYG editors like TinyMCE?
我有一个系统的用户不是技术精明
I have a system with users who are not "tech savvy" (so no WMD) and need a rich text editor that posts its content into a database.
我担心脚本攻击和恶意输入代码。
I'm worried about scripting attacks and malicious input code.
推荐答案
如果您只需要安全的HTML,那么您应该使用 HTML Purifier < a>。如果你想保护XSS和阻止所有的HTML,那么你应该使用 $ var = htmlspcialchars($ var,ENT_QUOTES);
If you only want safe html then you should use the HTML Purifier. If you want to protect against XSS and block all html then you should use $var=htmlspcialchars($var,ENT_QUOTES);
这篇关于TinyMCE安全问题:如何防止恶意输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文