aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2016-09-25 09:07:25 +0200
committerTollef Fog Heen <tfheen@err.no>2016-09-25 09:07:25 +0200
commit0f6d99a6757458b8c59ab78fd0e442a123f6815f (patch)
tree391d8521578ea04238f473139175aa38d453df52 /wee_slack.py
parent85ac81b7c818e01ff38488d82870adbb7f639893 (diff)
downloadwee-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.py3
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("&lt;", "<")
+ text = text.replace("&gt;", ">")
+ text = text.replace("&amp;", "&")
text = text.encode('utf-8')
if "reactions" in message_json: