From 200bcd4650e7695dd765088bf09eeba992e70a6e Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 11 Aug 2005 12:40:47 +0000 Subject: [PATCH] escape a char for uri --- src/common/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/helpers.py b/src/common/helpers.py index 3ab0e6903..e0f5a58e6 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -209,6 +209,7 @@ def launch_browser_mailer(kind, uri): if command == '': # if no app is configured return # we add the uri in "" so we have good parsing from shell + uri = uri.replace('"', '\\"') # escape " command = command + ' "' + uri + '" &' try: #FIXME: when we require python2.4+ use subprocess module os.system(command) @@ -231,7 +232,7 @@ def launch_file_manager(path_to_open): if command == '': # if no app is configured return # we add the path in "" so we have good parsing from shell - path_to_open = path_to_open.replace('"', '\\"') + path_to_open = path_to_open.replace('"', '\\"') # escape " command = command + ' "' + path_to_open + '" &' try: #FIXME: when we require python2.4+ use subprocess module os.system(command)