Re: How can i protect text format ?
- From: Paul Boddie <paul@xxxxxxxxxxxxx>
- Date: Tue, 23 Oct 2007 06:50:21 -0700
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
.
- References:
- How can i protect text format ?
- From: Abandoned
- How can i protect text format ?
- Prev by Date: Re: How can i protect text format ?
- Next by Date: Re: Set operations on object attributes question
- Previous by thread: Re: How can i protect text format ?
- Next by thread: Set operations on object attributes question
- Index(es):
Relevant Pages
|