Unescape backslashes in html_output (#6648)

This commit is contained in:
mamei16 2025-01-11 22:39:44 +01:00 committed by GitHub
parent 1b9121e5b8
commit f1797f4323
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,6 +239,9 @@ def convert_to_markdown(string):
pattern = re.compile(r'<code[^>]*>(.*?)</code>', re.DOTALL)
html_output = pattern.sub(lambda x: html.unescape(x.group()), html_output)
# Unescape backslashes
html_output = html_output.replace('\\\\', '\\')
# Add "long-list" class to <ul> or <ol> containing a long <li> item
html_output = add_long_list_class(html_output)