Home >Web Front-end >HTML Tutorial >How tornado preserves the line breaks in the string in render to display in the html page_html/css_WEB-ITnose

How tornado preserves the line breaks in the string in render to display in the html page_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:48:561870browse

For example:
message = "hi
Hello!"# (including line breaks)
self.render("logentry.html", content=message)

But loginry. The html does not display line breaks, and is processed as follows:
message = "hi
                                                                                                                                                                               self.render("logentry.html", content=message)
Not only is it not implemented, but
is displayed as content

Please give me some advice, thank you

Reply to discussion (solution)

Just use anti-transfer http://www.qttc.net/201305320.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn