1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

ulteriori cose

This commit is contained in:
Steffo 2019-03-01 18:02:22 +01:00
parent 27b49da1fa
commit 8a3ab600db

View file

@ -16,7 +16,7 @@ def safely_format_string(string: str, words: typing.Dict[str, str] = None, ignor
else: else:
escaped = {} escaped = {}
for key in words: for key in words:
escaped[key] = words[key].replace("<", "&lt;").replace(">", "&gt;") escaped[key] = str(words[key]).replace("<", "&lt;").replace(">", "&gt;")
return string.format_map(SafeDict(**escaped)) return string.format_map(SafeDict(**escaped))