...

View Full Version : Resolved Remove script tags



gusblake
12-08-2009, 07:34 PM
Hi,
I have a regular expression which removes anything between <script> and </script> tags. The problem comes when there is more than one on a page, eg.



<script>lose this</script>
content I want to keep
<script>lose this</script>


Everything in that string is removed... how can I limit it to complete tags only?

I did a search but could only find ones that either remove tags only, or have the same problem as mine.

Cheers,
Gus

jmrker
12-08-2009, 09:58 PM
Post what you are using so we can see what you have done.

gusblake
12-08-2009, 10:03 PM
I fixed it just now, someone on the PHP site had a function to remove specified tag and contents so I used that.

jmrker
12-09-2009, 01:35 AM
I fixed it just now, someone on the PHP site had a function to remove specified tag and contents so I used that.

Was it a PHP or JS solution? :eek:

If JS, post what you did so that others might learn.
:rolleyes:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum