From 00ac243de52af47c48b90422c8cf2bbc718fede0 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 15 Mar 2021 08:53:19 -0500 Subject: [PATCH] Allow x@x.tld forms in whispers --- Util.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Util.hs b/Util.hs index 9dec1da..310ab19 100644 --- a/Util.hs +++ b/Util.hs @@ -81,8 +81,9 @@ unescapeJid txt = fromString result ("20", ' '), ("22", '"'), ("26", '&'), ("27", '\''), ("2f", '/'), ("3a", ':'), ("3c", '<'), ("3e", '>'), ("40", '@'), ("5c", '\\') ] +-- Matches any URL-ish text, but not x@x.tld forms autolinkRegex :: PCRE.Regex -autolinkRegex = PCRE.compile (encodeUtf8 $ s"((http|https)://)?([a-z0-9-]+\\.)?[a-z0-9-]+(\\.[a-z]{2,6}){1,3}(/[a-z0-9.,_/~#&=;%+?-]*)?") [PCRE.caseless, PCRE.dotall] +autolinkRegex = PCRE.compile (encodeUtf8 $ s"(? Maybe Text sanitizeSipLocalpart localpart -- 2.34.5