Remove '\' from post-unescaped message-tags

This commit is contained in:
jesopo 2019-02-20 16:34:14 +00:00
parent 47841ed154
commit c1881fbafb

View file

@ -106,7 +106,8 @@ MESSAGE_TAG_UNESCAPED = [";", " ", r"\", "\r", "\n"]
def message_tag_escape(s): def message_tag_escape(s):
return _multi_replace(s, MESSAGE_TAG_UNESCAPED, MESSAGE_TAG_ESCAPED) return _multi_replace(s, MESSAGE_TAG_UNESCAPED, MESSAGE_TAG_ESCAPED)
def message_tag_unescape(s): def message_tag_unescape(s):
return _multi_replace(s, MESSAGE_TAG_ESCAPED, MESSAGE_TAG_UNESCAPED) unescaped = _multi_replace(s, MESSAGE_TAG_ESCAPED, MESSAGE_TAG_UNESCAPED)
return unescaped.replace(r"\", "")
def parse_line(line: str) -> IRCParsedLine: def parse_line(line: str) -> IRCParsedLine:
tags = {} # type: typing.Dict[str, typing.Any] tags = {} # type: typing.Dict[str, typing.Any]