If someone types in a phrase, such as:

I see you driving

round town with the girl I love,

and I’m like: haiku.

(no blank lines between each line, but the text is written on three separate lines) into a text box on a web page, and then presses a button which is then stored in a database via Django, and that string is read back and printed on a page, how can I get it to print on an HTML page with the newlines still in the text?

So instead of it being printed back as: I see you driving round town with the girl I love, and I’m like: haiku.

It would print as:

I see you driving

round town with the girl I love,

and I’m like: haiku.

I know that if I use: (textarea)soAndSo.body(/textarea), this preserves the newlines that were in the file when the user typed it up originally. How can I get this same effect, but without having to use textarea boxes?

Edit
Report