From 19a0f91bfc4d4bbfcedee8ee8315050ab30df822 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20Bili=C5=84ski?= <mateusz.bilinski@gmail.com>
Date: Fri, 12 Jun 2009 01:50:43 +0200
Subject: [PATCH] Unicode characters are detected properly as part of URLs now.
 Fixes 4522.

---
 src/gajim.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gajim.py b/src/gajim.py
index dbb51e2053..6ef6ff830e 100644
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -2587,8 +2587,8 @@ class Interface:
 
 		#FIXME: recognize xmpp: and treat it specially
 		links = r"((?<=\()[A-Za-z][A-Za-z0-9\+\.\-]*:"\
-			r"([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+"\
-			r"(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+)"
+			r"([\w\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+"\
+			r"(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([\w\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[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]'
-- 
GitLab