HTML escape the last commit

</s> didn't work, needed to be HTML escaped (Thanks for the tip VE!)
This commit is contained in:
henk717 2022-01-28 19:21:05 +01:00
parent be0e57185f
commit f9f25c01e4
1 changed files with 1 additions and 1 deletions

View File

@ -3158,7 +3158,7 @@ def tpumtjgenerate(txt, minimum, maximum, found_entries=None):
# Replaces returns and newlines with HTML breaks
#==================================================================#
def formatforhtml(txt):
return txt.replace("\\r\\n", "<br/>").replace("\\r", "<br/>").replace("\\n", "<br/>").replace("\r\n", "<br/>").replace('\n', '<br/>').replace('\r', '<br/>').replace('</s>', '<br/>')
return txt.replace("\\r\\n", "<br/>").replace("\\r", "<br/>").replace("\\n", "<br/>").replace("\r\n", "<br/>").replace('\n', '<br/>').replace('\r', '<br/>').replace('&lt;/s&gt;', '<br/>')
#==================================================================#
# Strips submitted text from the text returned by the AI