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 [192.168.1.2] (unknown [101.128.125.123]) by gnuweeb.org (Postfix) with ESMTPSA id EEE88804D1; Wed, 19 Oct 2022 18:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666202648; bh=r/WTlKpf9gaOuWo38ftiaygYWlEcX1w82+fm7Xf4fJo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=AZjtSE9HR+jC9TBixO8UNkLpGuTI8QDoRSP2rlSMPi9TVsNrr/KO7N+Ns+CGkY9p+ pPeBs0EltQCcQ9BF2mWOFZKog37s+ieI17IUMBGZalu02X4RpAcoK/X9gs4KTGfgo+ 6gqgQ465dc+ItDawVW7stCsOxKwAykuvS7jYy7k5gfSZDZQW6nEi1CBnpYGEAIcj3Z DnDT8DZ94ZEmTJFL+UhlYmUjBSMNTyBVA9UCT/Dr22Czo52mx9mycNbiSE8ow4SAt/ GGpo7ULgo8Ktm7+yax4vDsTyl+MyV67uaXsDtInfpw/wtJB+YCUHnBWhUanIKlG6XI 0dCv53x99OuKQ== Message-ID: <87218cae-5db1-47fc-9f60-acd141c3aa4b@gnuweeb.org> Date: Thu, 20 Oct 2022 01:04:04 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v1 4/7] atom: Improve fix_utf8_char() Content-Language: en-US To: Ammar Faizi 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> <31408c83-e9d3-3fcb-c109-b4b93df104d8@gnuweeb.org> <367d8f78-29a0-1e00-8019-c383c0a49d11@gnuweeb.org> From: Muhammad Rizki In-Reply-To: <367d8f78-29a0-1e00-8019-c383c0a49d11@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 20/10/2022 00.53, Ammar Faizi wrote: > On 10/20/22 12:51 AM, Muhammad Rizki wrote: >> On 20/10/2022 00.42, 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. >>> >> >> I know. I forgot where the conversation started, but you said this >> https://discord.com/channels/845302963739033611/845302963739033613/1028563014418444348 >> >> "Just send an empty email that would be fine." >> >> Sorry, I don't understand your statement about it. I thought you were >> asked me that the HTML contain tags should be empty or what. Please >> explain. > That is because the email is literally an empty email. > > If someone sends an empty email, then just send an empty > email would be fine. > > I didn't say we should remove all HTML special chars. > In the Telegram bot send that raw lore email URL send an empty email, but in the Discord bot, the HTML tags appear. Its from the default email payload that why I put re.sub() if `unescape` parameter is `True`, because I use the `unescape` parameter if the `platform == "discord"`. So, should I ignore it when an email payload contains HTML tags even you say that email is an empty email and remove the re.sub()?