Mercurial > libervia-web
comparison libervia/pages/events/admin/page_meta.py @ 1229:acec8e9185db
pages: replaced deprecated `cgi.escape` by `html.escape`
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 18 Nov 2019 21:49:42 +0100 |
parents | b2d067339de3 |
children | f511f8fbbf8a |
comparison
equal
deleted
inserted
replaced
1228:f3edbca73713 | 1229:acec8e9185db |
---|---|
6 from twisted.words.protocols.jabber import jid | 6 from twisted.words.protocols.jabber import jid |
7 from sat.tools.common.template import safe | 7 from sat.tools.common.template import safe |
8 from sat.core.i18n import _ | 8 from sat.core.i18n import _ |
9 from sat.core.log import getLogger | 9 from sat.core.log import getLogger |
10 import time | 10 import time |
11 import cgi | 11 import html |
12 import math | 12 import math |
13 import re | 13 import re |
14 | 14 |
15 name = "event_admin" | 15 name = "event_admin" |
16 access = C.PAGES_ACCESS_PROFILE | 16 access = C.PAGES_ACCESS_PROFILE |
57 html { | 57 html { |
58 background-image: url("%s"); | 58 background-image: url("%s"); |
59 background-size: 15em; | 59 background-size: 15em; |
60 } | 60 } |
61 """ | 61 """ |
62 % cgi.escape(background_image, True) | 62 % html.escape(background_image, True) |
63 ) | 63 ) |
64 template_data["event"] = event_data | 64 template_data["event"] = event_data |
65 invitees = yield self.host.bridgeCall( | 65 invitees = yield self.host.bridgeCall( |
66 "eventInviteesList", | 66 "eventInviteesList", |
67 event_data["invitees_service"], | 67 event_data["invitees_service"], |
135 request, ("service", "node", "event_id", "jids", "emails") | 135 request, ("service", "node", "event_id", "jids", "emails") |
136 ) | 136 ) |
137 for invitee_jid_s in jids.split(): | 137 for invitee_jid_s in jids.split(): |
138 try: | 138 try: |
139 invitee_jid = jid.JID(invitee_jid_s) | 139 invitee_jid = jid.JID(invitee_jid_s) |
140 except RuntimeError as e: | 140 except RuntimeError: |
141 log.warning( | 141 log.warning( |
142 _("this is not a valid jid: {jid}").format(jid=invitee_jid_s) | 142 _("this is not a valid jid: {jid}").format(jid=invitee_jid_s) |
143 ) | 143 ) |
144 continue | 144 continue |
145 yield self.host.bridgeCall( | 145 yield self.host.bridgeCall( |