From ca6730a16664f67f3317766a35d52de7b3c3e870 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 16 Jun 2024 02:24:22 +0300 Subject: [PATCH] Feat(Python3): Use `html.escape()` --- search-tags.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = ["""\

-- 2.39.2