Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TinyMCE security question: How do you prevent malicious input?

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.

like image 972
Walker Avatar asked Jun 15 '10 21:06

Walker


1 Answers

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);

like image 144
rook Avatar answered Sep 23 '22 16:09

rook