diff --git a/tcl.py b/tcl.py index d9190eb..c9c48b3 100644 --- a/tcl.py +++ b/tcl.py @@ -8,6 +8,7 @@ import asyncio import json import base64 import difflib +import re class Terminus: @@ -148,8 +149,12 @@ class Tcl(Plugin): msg.append(value["message"]) debut = datetime.fromisoformat(value["debut"]) fin = datetime.fromisoformat(value["fin"]) + newMsg = value["message"].replace('\t', '
') + newMsg = re.sub(r"(?\g<0>", newMsg) + newMsg = newMsg.replace('
 
', '
') + self.log.info(newMsg) respText = "

" + value["type"] + "

" + value["titre"] + "

" \ - + value["message"] + "

" + debut.strftime("%d/%m/%Y à %H:%M") + " au " \ + + newMsg + "

" + debut.strftime("%d/%m/%Y à %H:%M") + " au " \ + fin.strftime("%d/%m/%Y à %H:%M") + "

" await evt.respond(respText, allow_html=True) if(alerte==False):