Hi Paul

I don't think you understand the strip_tags() function.

> return strip_tags($return, '<script>');

... says, strip ALL tags EXCEPT <script>.  Check the docs at
http://php.net/strip_tags.  So if you don't want other tags to be
stripped, you need to add them to the list of exceptions.

HTH
Colin


On Tue, Jun 15, 2010 at 4:54 PM, Paul <[email protected]> wrote:
> Looks like this expression a little buggy:
>
> return strip_tags($return, '<script>');
>
> It remove ALL promo text, not a only <script>,  IF some <script></
> script> stand at the top of the post.
>
>
>
>
>
> How to do something like this?
>
> $return = str_replace( "/((<[\s\/]*script\b[^>]*>)([^>]*)(<\/script>))/
> i", ' ', $return);
>
> I guess it will be easy to do a quick str_replace for <script> tags.
>



-- 
Colin Seymour
Blog: http://colinseymour.co.uk
Tech Stuff: http://lildude.co.uk
Barefoot Running: http://barefootrunner.co.uk
IRC: lildude #habari

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev

Reply via email to