I have a variable in PHP which contains different HTML code. Sometimes i find in this HTML code parts of javascript code or jquery code. This extra code may or may not have the <script>
tag. So for example i might find jquery functions surrounded in a <p>
tag.
Is there a way to detect this javascript/jquery code in the string and delete?