Skip to content
Snippets Groups Projects
Commit 39f96a92 authored by Alexander Cherniuk's avatar Alexander Cherniuk
Browse files

Tweaked the RE for detecting URLs again

parent 35bbbfe5
No related branches found
No related tags found
No related merge requests found
......@@ -2432,8 +2432,7 @@ class Interface:
# FIXME: recognize xmpp: and treat it specially
links = r"((?<=\()[A-Za-z][A-Za-z0-9\+\.\-]*:"\
r"([\w\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+"\
r"(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([\w\.\-_~:/\?#\[\]@!\$"\
r"&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+)"
r"(?=\)))|(\w[\w\+\.\-]*:([^<>\s]|%[A-Fa-f0-9]{2})+)"
# 2nd one: at_least_one_char@at_least_one_char.at_least_one_char
mail = r'\bmailto:\S*[^\s\W]|' r'\b\S+@\S+\.\S*[^\s\W]'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment