Fixed API test case for PSQL

This commit is contained in:
Akshay Joshi 2023-07-14 11:18:58 +05:30
parent 038ab5eb90
commit d98ce3864f

View File

@ -41,9 +41,10 @@ def underscore_escape(text):
}
# always replace & first
for c, r in sorted(html_map.items(),
key=lambda x: 0 if x[0] == '&' else 1):
text = text.replace(c, r)
if text:
for c, r in sorted(html_map.items(),
key=lambda x: 0 if x[0] == '&' else 1):
text = text.replace(c, r)
return text
@ -65,8 +66,9 @@ def underscore_unescape(text):
}
# always replace & first
for c, r in html_map.items():
text = text.replace(c, r)
if text:
for c, r in html_map.items():
text = text.replace(c, r)
return text