+ 2
How to detect '\n' in HTML.
I am working on Django. Let suppose if user input like this :- hello man Here is \n new line character in this string but when i print this string in html i got output like this hello man How i can add new line html if I got \n in string. I know about <br/> but here am working in Django and i want to print new line in html through Django.
1 Respuesta
0
There are two ways:
You can use the string inside a <pre> tag.
Or you can replace "\n" with "<br>"
P.s: You have sent this question three time. Please delete the other two ones