From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [101.128.125.209]) by gnuweeb.org (Postfix) with ESMTPSA id 9CFA0819E4; Wed, 21 Dec 2022 01:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1671586464; bh=vWXJKbIXrRG88r/XBYyfjfR96yqzxG8bAkBwDTNTHdU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TiaVnTZq4ojqYBK6Na4auKDpDHJ8dtOBTH77aTBYQzefpfbWky2BQ3ELlLTb9J0hX ByXi9Lt7HcFMrRmet1HvFlPyxV+tAXBYooIhiQYeNZJJAxfVLG8gPsrpdGRLsaKG4+ 7IQvseHwDnSi59y0zr4T5X+zbwC7ssv1mIpjV9UqsWZK5WeDzWwHz5oV0UZxDBkzok 2IYMViMBvqx7fGdQqua2ej6evQ7NlrJUrn6UIPkV8U85speG6WYdwi6THvvJ5z/re4 W4fkY53zULs8xJGnOKpi0rP/Ow2S8JTVAE/NL8n/CpkXKDKmaWPnL6Lh0l143EvHc0 k9x0XcI9M3Ttw== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH v4 06/17] utils: Improve fix_utf8_char() Date: Wed, 21 Dec 2022 08:33:36 +0700 Message-Id: <20221221013347.1704-7-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20221221013347.1704-1-kiizuha@gnuweeb.org> References: <20221221013347.1704-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: Change on the html.escape() to use it only once. From the past issue bb8855bf, some email message doesn't escaped correctly, so I use the html.escape() twice. Within the current version, this issue should be fixed and can call the html.escape() just once. Fixes: bb8855bf ("Fix the storage management after the refactor was happened") Signed-off-by: Muhammad Rizki --- daemon/atom/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/atom/utils.py b/daemon/atom/utils.py index c08a7c1..1502687 100644 --- a/daemon/atom/utils.py +++ b/daemon/atom/utils.py @@ -280,7 +280,7 @@ def remove_patch(tmp: Union[str, list]): def fix_utf8_char(text: str, html_escape: bool = True): t = text.rstrip().replace("�"," ") if html_escape: - t = html.escape(html.escape(text)) + return html.escape(t) return t -- Muhammad Rizki