Escape HTML in chat messages
This commit is contained in:
parent
7966989667
commit
a4e903e932
2 changed files with 15 additions and 12 deletions
|
@ -1,3 +1,4 @@
|
|||
import html
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
|
@ -85,6 +86,7 @@ def convert_to_markdown(string):
|
|||
|
||||
|
||||
def generate_basic_html(string):
|
||||
string = html.escape(string)
|
||||
string = convert_to_markdown(string)
|
||||
string = f'<style>{readable_css}</style><div class="container">{string}</div>'
|
||||
return string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue