From 7d444381c743a2c7ce587b3b7fc4f32afa3e02aa Mon Sep 17 00:00:00 2001 From: Alisson Lauffer Date: Fri, 21 Jan 2022 06:26:52 -0300 Subject: [PATCH] Fix spoiler html unparsing (#862) - The current spoiler implementaion unparses both strikethrough and spoiler tags with , making them indistinguishable --- pyrogram/parser/html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/parser/html.py b/pyrogram/parser/html.py index c169dd1a..b70a189f 100644 --- a/pyrogram/parser/html.py +++ b/pyrogram/parser/html.py @@ -155,10 +155,10 @@ class HTML: start = entity.offset end = start + entity.length - if entity_type in ("bold", "italic", "underline", "strikethrough", "spoiler"): + if entity_type in ("bold", "italic", "underline", "strikethrough"): start_tag = f"<{entity_type[0]}>" end_tag = f"" - elif entity_type in ("code", "pre", "blockquote"): + elif entity_type in ("code", "pre", "blockquote", "spoiler"): start_tag = f"<{entity_type}>" end_tag = f"" elif entity_type == "text_link":