Fix HTML escape of "'".

This commit is contained in:
parazyd 2018-09-26 19:22:46 +02:00
parent cff9839d83
commit a334b3ffde
No known key found for this signature in database
GPG Key ID: F0CB28FCF78637DE
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ def html_escape(string):
""" """
Function for escaping certain symbols to XML-compatible sequences. Function for escaping certain symbols to XML-compatible sequences.
""" """
html_codes = [("'", '''), ('"', '"'), ('&', '&'), html_codes = [("'", '''), ('"', '"'), ('&', '&'),
('<', '&lt;'), ('>', '&gt;')] ('<', '&lt;'), ('>', '&gt;')]
for i in html_codes: for i in html_codes:
string = string.replace(i[0], i[1]) string = string.replace(i[0], i[1])