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=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [10.7.7.5] (unknown [182.253.183.71]) by gnuweeb.org (Postfix) with ESMTPSA id 55B61804D1; Wed, 19 Oct 2022 17:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666201577; bh=AoB1BugvJQSdcGKdWMYg5MD7DiP/wwW+J5affdKXZak=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=JlJK2WbgC2x3ViknDBCY0rg/l0mvv62K8yVABpby/UN89ppIkEU0gQU/+5pwEN66u OGfnStd+pZBfno4cVYKU2ibd2uaWoaHeBRL64X1Vhb7/CFxj8Wag5LvRvEv7jZja4m vKZN0cQQbhxV2FXU28KefcmmLz9rjkhOidwQ2YJtSzBuxX84nrIh+zoRGOSBnCxe3q eOnP+4hmPTg1+HRSx2+8jxpiIeiUuiyqfSKlKqmeZIYJiWdTqJ1ugBDyJMQlZr7lO9 AQtEVbE1dAnmIXTxSttm4Y23LF61zt0XpaR23Vu7YSqyQLsesG7No9xij8/R9XBXJY 3iuAgPkXE+7EA== Message-ID: Date: Thu, 20 Oct 2022 00:46:14 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v1 4/7] atom: Improve fix_utf8_char() Content-Language: en-US From: Ammar Faizi To: Muhammad Rizki Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List References: <20221018081635.1617-1-kiizuha@gnuweeb.org> <20221018081635.1617-5-kiizuha@gnuweeb.org> <14303851-8483-0737-8edc-649ee121f0ee@gnuweeb.org> <785390ce-e3ed-f1eb-dec6-a383563d139b@gnuweeb.org> <76df4a7f-dafc-c167-3b86-ae9dd6d0a233@gnuweeb.org> In-Reply-To: <76df4a7f-dafc-c167-3b86-ae9dd6d0a233@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 10/20/22 12:42 AM, Ammar Faizi wrote: > On 10/20/22 12:35 AM, Muhammad Rizki wrote: >> Ugh, hate when I should digging up the chat to give a prove. So, you want the re.sub() to be remove or no? > > What I want is: decode the email *properly*, then send it > to Telegram intact. > > That being said, if you have a string ">" in the email > decoded email, it should be still ">" when it is sent > to Telegram. If you have a string ">" in the decode email, > it should be still ">" when it is sent to Telegram. And > so on so forth... > > But what you do here is removing all HTML special chars > after unescape() it twice. I also don't understand why > unescape() should be called twice and nested like that. > > Make me understand why it is necessary doing that is > your job as a submitter. As you can see on Telegram just now ">" becomes ">" that is the part where you did it wrong. I want to keep the email intact when it is sent to Telegram. Side note: If you read this email from Telegram, it is shown wrong, so please read it from the lore or your Thunderbird. -- Ammar Faizi