Allowing
tags with Google App Engine and Jinja2

后端 未结 8 1722
粉色の甜心
粉色の甜心 2021-01-04 22:11

In my web app, the user can make blog posts. When I display the blog post, newlines aren\'t shown because I didn\'t replace the new lines with
tags.

8条回答
  •  感情败类
    2021-01-04 22:32

    You can use the |safe filter, or use the autoescape blocks:

    {% autoescape false %}
    {{ content goes here }}
    {% autoescape %}
    

    You could also set autoescaping in the environment to False.

提交回复
热议问题