Re: [PHP] stripping html tags

2005-06-06 Thread Richard Lynch
Your RegEx is probably fine... But you are probably missing a closing quote in lines BEFORE line 39, and PHP thinks everything up the the =^ is still part of some giant monster long string that spans multiple lines, and then it gets to the /head bit (because your opening quote is really a

Re: [PHP] stripping html tags

2005-06-06 Thread Dotan Cohen
On 6/7/05, Richard Lynch [EMAIL PROTECTED] wrote: Your RegEx is probably fine... But you are probably missing a closing quote in lines BEFORE line 39, and PHP thinks everything up the the =^ is still part of some giant monster long string that spans multiple lines, and then it gets to

[PHP] stripping html tags

2005-06-05 Thread Dotan Cohen
I took this example from php.net, but can't figure out where I went wrong. Why does this: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i , , $text); throw this error: syntax error at line 265, column 39: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i , , $text);

Re: [PHP] stripping html tags

2005-06-05 Thread Marek Kilimajer
Dotan Cohen wrote: I took this example from php.net, but can't figure out where I went wrong. Why does this: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i , , $text); throw this error: syntax error at line 265, column 39: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i

Re: [PHP] stripping html tags

2005-06-05 Thread Dotan Cohen
On 6/5/05, Marek Kilimajer [EMAIL PROTECTED] wrote: Dotan Cohen wrote: I took this example from php.net, but can't figure out where I went wrong. Why does this: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i , , $text); throw this error: syntax error at line 265, column 39:

Re: [PHP] stripping html tags

2005-06-05 Thread Richard Lynch
On Sun, June 5, 2005 7:05 am, Dotan Cohen said: I took this example from php.net, but can't figure out where I went wrong. Why does this: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i , , $text); throw this error: syntax error at line 265, column 39: $text =

Re: [PHP] stripping html tags

2005-06-05 Thread Dotan Cohen
On 6/6/05, Richard Lynch [EMAIL PROTECTED] wrote: On Sun, June 5, 2005 7:05 am, Dotan Cohen said: I took this example from php.net, but can't figure out where I went wrong. Why does this: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i , , $text); throw this error: syntax error at

[PHP] Stripping HTML tags, but keeping entities...

2002-11-20 Thread David Russell
Hi all I have a text field that users can enter any information into (it is supposed to be a description field) For obvious reasons, I want to strip unfriendly HTML/PHP tags. This I am doing using: strip_tags($_POST['Duplicate'], 'B I P A LI OL UL EM BR TT STRONG BLOCKQUOTE DIV ECODE '); OK,

Re: [PHP] Stripping HTML tags, but keeping entities...

2002-11-20 Thread Justin French
on 21/11/02 2:25 AM, David Russell ([EMAIL PROTECTED]) wrote: strip_tags($_POST['Duplicate'], 'B I P A LI OL UL EM BR TT STRONG BLOCKQUOTE DIV ECODE '); OK, so this is cool. I got this list from the Slashdot allowed tags list, which I would assume is ok. Whoa there... NEVER assume because