From 03cae696c178f7a858ba723e4cdb9d596356c18b Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 8 Nov 2018 11:52:53 +0000 Subject: [PATCH] Technically, we only need to unescape non-json message-tag *values* --- src/utils/irc.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/irc.py b/src/utils/irc.py index 01c382a2..f4a1f1b2 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -97,12 +97,10 @@ def parse_line(line: str) -> IRCLine: tags_prefix = message_tag_unescape(tags_prefix) tags = json.loads(tags_prefix) else: - tags_split = list(filter(None, tags_prefix.split(";"))) - tags_split = [message_tag_unescape(tag) for tag in tags_split] - for tag in tags_split: + for tag in filter(None, tags_prefix.split(";")): tag, sep, value = tag.partition("=") if sep: - tags[tag] = value + tags[tag] = message_tag_unescape(value) else: tags[tag] = None