From a35b0f72bab35a2e0a8510569414edb83aaf84ae Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Sun, 25 Jan 2009 21:38:35 +0000
Subject: [PATCH] [Merwok] decode correctly URLs in gajim-remote handle_uri.
 Fixes #4703

---
 src/gajim-remote.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gajim-remote.py b/src/gajim-remote.py
index c914362dc3..1bbf769a25 100644
--- a/src/gajim-remote.py
+++ b/src/gajim-remote.py
@@ -28,6 +28,7 @@
 
 import sys
 import locale
+import urllib
 import signal
 signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
 
@@ -507,6 +508,10 @@ class GajimRemote:
 			self.command = sys.argv[1] = 'open_chat'
 			return
 		(jid, action) = uri.split('?', 1)
+		try:
+			jid = urllib.unquote(jid)
+		except UnicodeDecodeError:
+			pass
 		sys.argv[2] = jid
 		if action == 'join':
 			self.command = sys.argv[1] = 'join_room'
-- 
GitLab