Re: How can i protect text format ?



On 23 Okt, 15:30, Abandoned <best...@xxxxxxxxx> wrote:
Hi..
I want to do a forum with python but i have a problem..

I have a <textarea> and i write:
line 1 hi
line 2 how r u

And then i save to this database ( colomn data type is text)
And than it looks "line 1 hi line 2 how r u"..
How can i protect \n characters ?

Some questions:

1. How do you extract the data from the textarea? Which Web framework/
library are you using?

2. Are you sure that the "\n" characters are missing when you extract
the data? (Printing/writing the data to a log, perhaps using the repr
function, can be very useful.)

3. How do you save the data to the database?

4. How do you view the contents in the database? If you aren't yet
viewing the contents in your application, but instead in your database
client, does your database client show "\n" characters? If your
application is showing the contents, what does the data look like
before you try and display it? (Again, writing to a log can be
useful.)

Paul

.



Relevant Pages

  • Re: textarea curiousity
    ... I bypassed the database and simply sent the text ... characters match the text I put in. ... When I create a textarea, put stuff in, save it to the database, and ... How can I get it to display starting ...
    (comp.lang.php)
  • Re: Multiline database entries
    ... what I'm trying to do is get a private message sent between two ... >>TEXTAREA and then PHP handles the storing of everything to a MySQL ... >>Using a blob in the database ... > First for that u dont need a blob field but a Text is enough, ...
    (alt.php)
  • Re: Multiline Textbox Problems
    ... I am using the textarea to enter the data from the form into the ... In this site you will find some php code. ... The data was saved in the database field exactly the same. ... displaying come from the database. ...
    (comp.lang.php)
  • textarea problem
    ... I have a web form which has a textarea that takes in a large amount ... of text and saves to the database. ... Client browser is IE6. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Creating session variables in GLOBAL.ASA ???
    ... WYSIWYG editor ... all i am working on a textarea where X number of char reaches in a line then ... >> Eventually I'll need to access a database and I'm assuming that if I ...
    (microsoft.public.inetserver.asp.general)