I'm doing a JSON request which grabs a list of results from a database.
One of the columns of the results was textarea data, in which I'd like
to preserve the newlines entered.
I'm able to do a python equivalent of PHP's nl2br function without JSON
(for anyone curious: <span py:for="line in
mytextareatext.splitlines()">${line}<br/></span>).
I also tried a Javascript equivalent of nl2br (once again for anyone
who needs it:
http://snipplr.com/view/634/replace-newlines-with-br-platform-safe/),
but it just managed to print out a bunch of <br /> into the text (i.e.
converting the < and >).
Does anyone know how to do this?
Frank
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---