From: Oleg Broytman Date: Sat, 15 Jun 2024 23:24:22 +0000 (+0300) Subject: Feat(Python3): Use `html.escape()` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ca6730a16664f67f3317766a35d52de7b3c3e870;hp=6b8f72d09fb42173a895b00197fa1fb86009fc2f;p=phdru.name%2Fcgi-bin%2Fblog-ru%2Fsearch-tags.git Feat(Python3): Use `html.escape()` --- diff --git a/search-tags.py b/search-tags.py index 2a0a0fa..6281a1b 100755 --- a/search-tags.py +++ b/search-tags.py @@ -6,6 +6,7 @@ __author__ = "Oleg Broytman " __copyright__ = "Copyright (C) 2014-2024 PhiloSoft Design" __license__ = "GNU GPL" +from html import escape import sys from lark import ParseError @@ -44,7 +45,7 @@ else: from tags import find_tags posts = find_tags(tree) status = None - title = "úÁÐÉÓÉ, ÎÁÊÄÅÎÎÙÅ ÄÌÑ ×ÙÒÁÖÅÎÉÑ " + mycgi.escape(q) + title = "úÁÐÉÓÉ, ÎÁÊÄÅÎÎÙÅ ÄÌÑ ×ÙÒÁÖÅÎÉÑ " + escape(q) if posts: _posts = ["""\