diff libervia/pages/blog/view/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 0f0c36992f3c
children f511f8fbbf8a
line wrap: on
line diff
--- 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']: