Remove JavaScript code from HTML
2 answers
Deleting just tags <script>
won't actually be done. This is because you can also put Javascript in event handlers (onclick, etc.). They are much more difficult to catch with regex.
Once again, we are revisiting the problem or parsing or processing the HTML with regular expressions. This is the wrong tool for the job. If you don't need brittle code, use an HTML parser.
+5
a source to share