php - Making a string safe by removing all javascript codes and events -
php - Making a string safe by removing all javascript codes and events -
i want remove javascript codes string contains html code.
for illustration these unwanted javascript codes may cause problems on website:
<div onmouseover='window.location = "http://to-undesirable-location"'></div> or
<img onload='window.location = "http://to-undesirable-location"'></img> or
<script language="javascript> ...unwanted code... </script> since hackers can utilize js functions redirect page unwanted pages wonder why there not source create type of content safe... on website there simple wysiwyg editor users can set html content within it.
thanks
i've heard things on stack overflow html purifier.
php
Comments
Post a Comment