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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -