Make encoded message id html-safe

Exclude & and ' from list of allowed characters, so that the encoded
message id can be used unescaped.
This commit is contained in:
Peter J. Holzer 2019-02-28 17:16:05 +01:00
parent 341d5dd229
commit d5e557e8e4
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ def get_message_id(msg):
return match.group(1)
def encode_message_id(msgid):
encmsgid = re.sub('[^!"$-.0-9:=@-z|~]', lambda x: "{%02x}" % (ord(x.group(0))), msgid)
encmsgid = re.sub('[^!"$(-.0-9:=@-z|~]', lambda x: "{%02x}" % (ord(x.group(0))), msgid)
return encmsgid
def render_message(msg):