Fix HTML escape of "'".

This commit is contained in:
2018-09-26 19:22:46 +02:00
parent cff9839d83
commit a334b3ffde

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])