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.
Note that i have autoescape on by default, so I don't check it in this function, but this is what I'm using
def nl2br(value): split = value.split('\n') return jinja2.Markup('').join(split)
then of course,
jinja_env.filters['nl2br'] = nl2br