javascript - How to remove unsafe contents of WYSIWYG editors before use it? -
how remove unsafe contents of wysiwyg editors script tags or iframe tags , events of other tags before use it?
<script> // dangerous contents </script> <iframe> // bad web pages </iframe> <span onclick="javascript://do bad work here !!!">click me</span>
you shouldn't try write such protection on own.
specially, should not place protection on client side (javascript), use instead server side filtering http://htmlpurifier.org/
Comments
Post a Comment