[gaim-migrate @ 2109]

Wed, 01 Aug 2001 18:33:25 +0000

author
Eric Warmenhoven <warmenhoven@yahoo.com>
date
Wed, 01 Aug 2001 18:33:25 +0000
changeset 2099
21c55fba9bf4
parent 2098
f3e9df9c7f62
child 2100
58ebaa769cb2

[gaim-migrate @ 2109]
this has been bugging me for a while.

src/browser.c file | annotate | diff | comparison | revisions
--- 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";

mercurial