Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 39d2dd0

Browse files
committed
Strip message edit tags in SkypeTextMsg.plain and .markup
1 parent 122ac84 commit 39d2dd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

skpy/msg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ def plain(self):
331331
text = re.sub(r"</?(e|b|i|ss?|pre|quote|legacyquote)\b.*?>", "", self.content)
332332
text = re.sub(r"""<a\b.*?href="(.*?)">.*?</a>""", r"\1", text)
333333
text = re.sub(r"""<at\b.*?id="8:(.*?)">.*?</at>""", r"@\1", text)
334+
text = re.sub(r"""<e_m\b.*?>.*?</e_m>""", r"", text)
334335
text = (text.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", "&")
335336
.replace("&quot;", "\"").replace("&apos;", "'"))
336337
return text
@@ -346,6 +347,7 @@ def markup(self):
346347
text = re.sub(r"</?pre\b.*?>", "{code}", text)
347348
text = re.sub(r"""<a\b.*?href="(.*?)">.*?</a>""", r"\1", text)
348349
text = re.sub(r"""<at\b.*?id="8:(.*?)">.*?</at>""", r"@\1", text)
350+
text = re.sub(r"""<e_m\b.*?>.*?</e_m>""", r"", text)
349351
text = (text.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", "&")
350352
.replace("&quot;", "\"").replace("&apos;", "'"))
351353
return text

0 commit comments

Comments
 (0)