On Jan 10, 8:13 pm, zweb <traderash...@gmail.com> wrote: > Javascript: > document.getElemnetById(’textareacontent’).value.replace(/\n/ > g,’<br>’); > PHP: > preg_replace(”/\n/”,”<br>”,$_REQUEST['t1']); > Ruby: > (teaxtareacontent).gsub(/\n/,”<br>”) > > ( reference > -http://rkutti.wordpress.com/2008/01/31/display-textarea-content-with-...)
I'm not exactly sure what you mean, as you don't want to put a <br /> inside a text area without escaping it. If you are talking about displaying text that you got from a text area, then the PHP idiom is nl2br(). In Django templates, see the linebreaks and linebreaksbr filters: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#linebreaks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---