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)
)
Validate HTML from user
108 Views Asked by user1019812 At
2
You can use HTML Purifier.