changeset 2099:33a3b6b903d9

[gaim-migrate @ 2109] this has been bugging me for a while. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 01 Aug 2001 18:33:25 +0000
parents d37c2220e4df
children a93aeb6f813d
files src/browser.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser.c	Wed Aug 01 17:52:38 2001 +0000
+++ b/src/browser.c	Wed Aug 01 18:33:25 2001 +0000
@@ -603,10 +603,14 @@
 
 			char command[1024];
 
-			if ((url[0] == '\"') && (url[strlen(url)-1] == '\"'))
+			char *ms;
+
+			if (strstr(web_command, "\"%s\""))
 				g_snprintf(command, sizeof(command), web_command, url);
-			else
-				g_snprintf(command, sizeof(command), "%s \"%s\"", web_command, url);
+			else if ((ms = strstr(web_command, "%s")) != NULL) {
+				*ms = 0;
+				g_snprintf(command, sizeof(command), "%s\"%s\"%s", web_command, url, ms + 2);
+			}
 
 			args[0] = "sh";
 			args[1] = "-c";