Re: [PHP] strip_tags and nl2br



Chris wrote:

Are you sure there are newlines before you run strip_tags?

I would assume so, because everything from the textarea runs together in one line when displayed in the browser until filtered through nl2br(). That would suggest to me that there are indeed \n's that are being converted to <br>'s.

It doesn't touch newlines because they aren't html entities.

That is exactly why I am distressed.

James
--
My blog: http://www.crazydrclaw.com/
My homepage: http://james.colannino.org/

"When you do the common things in life in an uncommon way, you will command the attention of the world." --George Washington Carver
.



Relevant Pages

  • Re: [PHP] strip_tags and nl2br
    ... because everything from the textarea runs together in one line when displayed in the browser until filtered through nl2br(). ... I solved this by entering the data with newlines instead of tags, so only when displaying the data do I run nl2brafter running strip_tags. ...
    (php.general)
  • WebBrowser Focus?
    ... typing, I go to some other application & then come back to the browser. ... TextArea when the browser lost focus, when the browser gets back the ... To scroll the page, I have to either click somewhere on the ...
    (microsoft.public.vb.general.discussion)
  • Re: etckeeper - keeping /etc under version control
    ... Chris> white rabbits that I could live without - and other prettifying ... fit the browser window. ... (or CSS table formatting) ...
    (Debian-User)
  • Re: Browser versus Java URLConnection
    ... Chris Uppal wrote: ... saved out of a browser from the same URL. ... characters, whereas the lines read in Java are missing ... been deleted in the Java lines. ...
    (comp.lang.java.programmer)
  • RE: The Web server reported the following error when attempting to cre
    ... Chris can you post more details do this by going to.. ... your browser, go to the Internet Options dialog. ... Click on Advanced tab. ...
    (microsoft.public.dotnet.framework.aspnet)