List:General Discussion« Previous MessageNext Message »
From:gerald_clark Date:September 9 2005 7:29pm
Subject:Re: HTML in MySQL?
View as plain text  
Vladimir B. Tsarkov wrote:

>Hello!
>
>  
>
>>Be careful here Vladimir, the (\n) are not 'null' characters; but newline
>>characters.  
>>    
>>
>
>Agree, I was wrong.
>
>  
>
>>And i would highly recommend *not* replacing them with <br> 
>>tags as you write them into the database.  This is asking for trouble on
>>so many levels.
>>
>>The database will cope with carriage returns and newlines just like any
>>other character, so will have no problems.
>>
>>HTML is just string; treat it as such and don't give it anymore credit
>>than that and you'll be fine.
>>    
>>
>
>If you need to output a HTML string (not in a textarea field), you'll need 
>to replace "\n" with "<br>". That is why, I think that it is better to 
>replace it before saving (You will not need to replace "\n" during the output 
>process. It will save you some lines of code, and add productivity.). Of 
>course, you need to be sure that your program will make HTML output more 
>often, than any other type of output.
>
>  
>
But once you have done that, you can never recover the origional text.
Try it on this email if you doubt it.

Thread
HTML in MySQL?clint lenard9 Sep
  • Re: HTML in MySQL?Jasper Bryant-Greene9 Sep
    • Re: HTML in MySQL?clint lenard9 Sep
      • Re: HTML in MySQL?Jasper Bryant-Greene9 Sep
        • Re: HTML in MySQL?clint lenard9 Sep
  • Re: HTML in MySQL?douglass_davis12 Sep
    • Re: HTML in MySQL?clint lenard12 Sep
      • Re: HTML in MySQL?clint lenard12 Sep
        • Re: HTML in MySQL?clint lenard12 Sep
          • Re: HTML in MySQL?Hassan Schroeder12 Sep
RE: HTML in MySQL?SST - Adelaide)9 Sep
Re: HTML in MySQL?Unknown Sender9 Sep
Re: HTML in MySQL?Unknown Sender9 Sep
RE: HTML in MySQL?Alan Williamson9 Sep
  • Re: HTML in MySQL?Unknown Sender9 Sep
    • Re: HTML in MySQL?gerald_clark9 Sep
    • Re: HTML in MySQL?Filipe Tomita9 Sep
  • Re: HTML in MySQL?Unknown Sender9 Sep
RE: HTML in MySQL?John Trammell9 Sep
Re: HTML in MySQL?Unknown Sender11 Sep
  • Re: HTML in MySQL?Roger Baklund11 Sep
Re: HTML in MySQL?Unknown Sender11 Sep
RE: HTML in MySQL?John Trammell11 Sep
  • Re: HTML in MySQL?Jasper Bryant-Greene12 Sep
    • Re: HTML in MySQL?Jasper Bryant-Greene12 Sep
      • Re: HTML in MySQL?clint lenard12 Sep