From b8660c11b4394e3c71ba4729221be8523b97b353 Mon Sep 17 00:00:00 2001 From: STDquantum <405720329@qq.com> Date: Sun, 17 Dec 2023 21:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=B6=88=E6=81=AF=E8=BF=98=E5=AD=98=E5=9C=A8?= =?UTF-8?q?xml=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/DataBase/output_pc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/DataBase/output_pc.py b/app/DataBase/output_pc.py index e9f026a..176c253 100644 --- a/app/DataBase/output_pc.py +++ b/app/DataBase/output_pc.py @@ -420,7 +420,11 @@ class ChildThread(QThread): str_time = message[8] timestamp = message[5] is_chatroom = 1 if self.contact.is_chatroom else 0 - str_content = escape_js_and_html(str_content.lstrip('').rstrip('')) + str_content = str_content.lstrip('重新编辑]]>') + res = findall('()', str_content) + for xmlstr, b in res: + str_content = str_content.replace(xmlstr, "") + str_content = escape_js_and_html(str_content) if self.output_type == Output.HTML: doc.write( f'''{{ type:0, text: '{str_content}',is_send:{is_send},avatar_path:'',timestamp:{timestamp},is_chatroom:{is_chatroom},displayname:''}},'''