From 3bbecab05cb2e11a421f45ddfe23aabf9499000d Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 24 Jul 2018 19:40:57 +0200 Subject: [PATCH] better endline --- templates/components/event.html | 4 +++- webserver.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/components/event.html b/templates/components/event.html index 4f740621..66494252 100644 --- a/templates/components/event.html +++ b/templates/components/event.html @@ -15,6 +15,8 @@ di {{ event.author.username }}
- {{ event.description }} + {% autoescape false %} + {{ escape(event.description).replace('\n', '
') }} + {% endautoescape %}
\ No newline at end of file diff --git a/webserver.py b/webserver.py index 21da25dd..187482ae 100644 --- a/webserver.py +++ b/webserver.py @@ -61,7 +61,7 @@ def page_main(): next_events = db_session.query(db.Event).filter(db.Event.time > datetime.datetime.now()).order_by(db.Event.time).all() db_session.close() return render_template("main.html", royals=royals, wiki_pages=wiki_pages, diario=random_diario, - next_events=next_events, config=config, a_day=datetime.timedelta(days=1)) + next_events=next_events, config=config, escape=escape) @app.route("/profile/")