How can I validate a HTML code submitted by the user? Looking for <script> tags is easy, but you can also embed JS in for example <div onclick="yyy"></div>. Are there any ready to use libraries/functions? (like $safeHTML = validateCode($rawHTML))
How can I validate a HTML code submitted by the user? Looking for <script>
Share
You can use HTML Purifier.