diff options
author | Tollef Fog Heen <tfheen@err.no> | 2016-09-25 09:07:25 +0200 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2016-09-25 09:07:25 +0200 |
commit | 0f6d99a6757458b8c59ab78fd0e442a123f6815f (patch) | |
tree | 391d8521578ea04238f473139175aa38d453df52 /wee_slack.py | |
parent | 85ac81b7c818e01ff38488d82870adbb7f639893 (diff) | |
download | wee-slack-0f6d99a6757458b8c59ab78fd0e442a123f6815f.tar.gz |
Do minimal HTML entity decoding
Just handle <>& for now.
Fixes: #186
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index a7c80f2..1219836 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1693,6 +1693,9 @@ def render_message(message_json, force=False): text = text.lstrip() text = text.replace("\t", " ") + text = text.replace("<", "<") + text = text.replace(">", ">") + text = text.replace("&", "&") text = text.encode('utf-8') if "reactions" in message_json: |