[postr/postr-0-12: 274/282] Merge authentication fix from postr.dev



commit 37d0f0cefadf02a637a7d35a74244321ad60fc35
Author: Ross Burton <ross burtonini com>
Date:   Tue May 27 09:35:50 2008 +0100

    Merge authentication fix from postr.dev

 src/AuthenticationDialog.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/AuthenticationDialog.py b/src/AuthenticationDialog.py
index 3147a65..2322ea0 100644
--- a/src/AuthenticationDialog.py
+++ b/src/AuthenticationDialog.py
@@ -22,9 +22,11 @@ def on_url_clicked(button, url):
     """Global LinkButton handler that starts the default GNOME HTTP handler, or
     firefox."""
     client = gconf.client_get_default()
+    # Escape the & with blackslashes so that browser opening works with Firefox
+    # -remote calls.
+    url = url.replace("&", "\\&")
     browser = client.get_string("/desktop/gnome/url-handlers/http/command") or "firefox %s"
-    # Because URLs contain & it needs to be quoted
-    browser = browser % '"' + url + '"'
+    browser = browser % url
     subprocess.Popen(args=browser, shell=True)
     # TODO: if that didn't work fallback on x-www-browser or something
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]