# HG changeset patch # User Goffi # Date 1574110182 -3600 # Node ID acec8e9185db3687310a9d672b86db49ef15ee71 # Parent f3edbca7371385cc9beac1cd1a871621c13d7bd4 pages: replaced deprecated `cgi.escape` by `html.escape` diff -r f3edbca73713 -r acec8e9185db libervia/pages/blog/view/page_meta.py --- a/libervia/pages/blog/view/page_meta.py Mon Nov 18 21:46:12 2019 +0100 +++ b/libervia/pages/blog/view/page_meta.py Mon Nov 18 21:49:42 2019 +0100 @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- import unicodedata import re -import cgi +import html from libervia.server.constants import Const as C from twisted.words.protocols.jabber import jid from twisted.internet import defer @@ -235,7 +235,7 @@ :root { --bg-img: url("%s"); } - """ % cgi.escape(bg_img, True)) + """ % html.escape(bg_img, True)) template_data['items'] = data['items'] = items if request.args.get(b'reverse') == ['1']: diff -r f3edbca73713 -r acec8e9185db libervia/pages/events/admin/page_meta.py --- a/libervia/pages/events/admin/page_meta.py Mon Nov 18 21:46:12 2019 +0100 +++ b/libervia/pages/events/admin/page_meta.py Mon Nov 18 21:49:42 2019 +0100 @@ -8,7 +8,7 @@ from sat.core.i18n import _ from sat.core.log import getLogger import time -import cgi +import html import math import re @@ -59,7 +59,7 @@ background-size: 15em; } """ - % cgi.escape(background_image, True) + % html.escape(background_image, True) ) template_data["event"] = event_data invitees = yield self.host.bridgeCall( @@ -137,7 +137,7 @@ for invitee_jid_s in jids.split(): try: invitee_jid = jid.JID(invitee_jid_s) - except RuntimeError as e: + except RuntimeError: log.warning( _("this is not a valid jid: {jid}").format(jid=invitee_jid_s) ) diff -r f3edbca73713 -r acec8e9185db libervia/pages/events/rsvp/page_meta.py --- a/libervia/pages/events/rsvp/page_meta.py Mon Nov 18 21:46:12 2019 +0100 +++ b/libervia/pages/events/rsvp/page_meta.py Mon Nov 18 21:49:42 2019 +0100 @@ -8,7 +8,7 @@ from sat.core.log import getLogger from sat.tools.common.template import safe import time -import cgi +import html """creation of new events""" @@ -58,7 +58,7 @@ background-size: 15em; } """ - % cgi.escape(background_image, True) + % html.escape(background_image, True) ) template_data["event"] = event_data event_invitee_data = yield self.host.bridgeCall( diff -r f3edbca73713 -r acec8e9185db libervia/pages/events/view/page_meta.py --- a/libervia/pages/events/view/page_meta.py Mon Nov 18 21:46:12 2019 +0100 +++ b/libervia/pages/events/view/page_meta.py Mon Nov 18 21:49:42 2019 +0100 @@ -9,7 +9,7 @@ from sat.tools.common import uri from sat.tools.common.template import safe import time -import cgi +import html from sat.core.log import getLogger name = "event_view" @@ -55,7 +55,7 @@ background-size: 15em; } """ - % cgi.escape(background_image, True) + % html.escape(background_image, True) ) template_data["event"] = event_data event_invitee_data = yield self.host.bridgeCall(