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

WBOY
Release: 2016-06-24 11:48:56
Original
1862 people have browsed it

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template