diff options
author | André Apitzsch <git@apitzsch.eu> | 2022-09-27 15:31:07 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2022-09-27 18:14:02 +0300 |
commit | 7af1dc666fe673723ac5ed5962ae8dbf7eed72b0 (patch) | |
tree | 2dac309706ac9427d28268ad1d12435a92918a6d | |
parent | b7c95991c7191230db081d07fd01560a9b356b66 (diff) |
fix: Styling: Allow dots in local part of email addresses
-rw-r--r-- | gajim/common/styling.py | 2 | ||||
-rw-r--r-- | test/no_gui/test_styling.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gajim/common/styling.py b/gajim/common/styling.py index fb7f79352..fce6389ad 100644 --- a/gajim/common/styling.py +++ b/gajim/common/styling.py @@ -44,7 +44,7 @@ BLOCK_NESTED_RX = re.compile(PRE_NESTED_RX + '|' + QUOTE_RX, re.S | re.M) UNQUOTE_RX = re.compile(r'^> |^>', re.M) URI_RX = r'(?P<uri>([\w-]+://|www[.])[\S()<>]+?(?=[,>]?(\s|\Z)+))' -ADDRESS_RX = r'(?P<address>\b((xmpp|mailto):)?[\w-]*@([\w-]*?\.)+[\w]+([\?].*?(?=([\s\),]|$)))?)' # noqa: E501 +ADDRESS_RX = r'(?P<address>\b((xmpp|mailto):)?[\w-]+(\.[\w-]+)*@([\w-]*?\.)+[\w]+([\?].*?(?=([\s\),]|$)))?)' # noqa: E501 URI_ADDRESS_RX = URI_RX + '|' + ADDRESS_RX URI_RX = re.compile(URI_RX) diff --git a/test/no_gui/test_styling.py b/test/no_gui/test_styling.py index f701fbdc9..f45103714 100644 --- a/test/no_gui/test_styling.py +++ b/test/no_gui/test_styling.py @@ -326,8 +326,10 @@ EMAILS = [ 'asd@asd.at', 'asd@asd.asd.at', 'asd@asd.asd-asd.at', + 'asd.asd@asd.asd-asd.at', 'asd-asd@asd.asdasd.at', 'mailto:foo@bar.com.uk', + 'mailto:foo.foo.foo@bar.com.uk', ] EMAILS_WITH_TEXT = [ |