Skip to content
Snippets Groups Projects
Commit cb0b669b authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

detect URL before email. Fixes #1261

parent e0b5b420
No related branches found
No related tags found
No related merge requests found
......@@ -458,7 +458,20 @@ def print_special_text(self, special_text, other_tags):
img.set_from_file(gajim.interface.emoticons[emot_ascii])
img.show()
#add with possible animation
self.add_child_at_anchor(img, anchor)
self.add_child_at_anchor(img, anchor)
elif special_text.startswith('http://') or \
special_text.startswith('www.') or \
special_text.startswith('ftp://') or \
special_text.startswith('ftp.') or \
special_text.startswith('https://') or \
special_text.startswith('gopher://') or \
special_text.startswith('news://') or \
special_text.startswith('ed2k://') or \
special_text.startswith('irc://') or \
special_text.startswith('magnet:'):
#it's a url
tags.append('url')
use_other_tags = False
elif special_text.startswith('mailto:'):
#it's a mail
tags.append('mail')
......
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