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 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 CC9E28191C; Mon, 19 Dec 2022 23:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1671494277; bh=9Btymf4hHltz4MRw9ja+AdMg7QIdsZXiOj1UtwyJt7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g5NnXKyZGRCtoVJDfD8fSoUN5s7akKRmFop5vPXJP1qh8A8fDaLzt5bwjOw15CrzB oAqOn7UZfvrHijFf0jzFdzTAAOXjJnuAj/LosEaJ4q60rMFYiDNrwZ899rsbprT54D LYKTp/9vBZPjBFT18eU7Q0cQUbaH4u1Mh3/08CHU4Ye2yztiW1M9qYlYIdLMc55NE0 gvfUCUaj+kyYBGGDuoJUatudYM9xo1ZQ7+hKdMVGdAEczcqd1u+TkoapQEXp+NuzSb pamTQKUthl6b5Mnis1yauEZU5BTqWh2wHTIClNWkxxoppRYeZy60K/iojOE26jGMyA bMlKogrU8DG+A== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH v3 06/17] utils: Improve fix_utf8_char() Date: Tue, 20 Dec 2022 06:57:10 +0700 Message-Id: <20221219235721.126-7-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20221219235721.126-1-kiizuha@gnuweeb.org> References: <20221219235721.126-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 127b0cc..4fa6bcd 100644 --- a/daemon/atom/utils.py +++ b/daemon/atom/utils.py @@ -278,7 +278,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