Fix autolinking user IDs including ; or <

This commit is contained in:
miruka 2020-07-29 02:00:49 -04:00
parent 865d6b8bc8
commit 03f9ec94ff

View File

@ -119,7 +119,7 @@ class HTMLProcessor:
} }
opaque_id = r"[a-zA-Z\d._-]+?" opaque_id = r"[a-zA-Z\d._-]+?"
user_id_localpart = r"[\x21-\x39\x3D-\x7E]+?" user_id_localpart = r"[\x21-\x39\x3B-\x7E]+?"
user_id_regex = re.compile( user_id_regex = re.compile(
rf"(?P<body>@{user_id_localpart}:(?P<host>[a-zA-Z\d.:-]*[a-zA-Z\d]))", rf"(?P<body>@{user_id_localpart}:(?P<host>[a-zA-Z\d.:-]*[a-zA-Z\d]))",