comparison src/browser.c @ 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 b66aca8e8dce
children 2927c2c26fe6
comparison
equal deleted inserted replaced
2098:d37c2220e4df 2099:33a3b6b903d9
601 if (pid == 0) { 601 if (pid == 0) {
602 char *args[4]; 602 char *args[4];
603 603
604 char command[1024]; 604 char command[1024];
605 605
606 if ((url[0] == '\"') && (url[strlen(url)-1] == '\"')) 606 char *ms;
607
608 if (strstr(web_command, "\"%s\""))
607 g_snprintf(command, sizeof(command), web_command, url); 609 g_snprintf(command, sizeof(command), web_command, url);
608 else 610 else if ((ms = strstr(web_command, "%s")) != NULL) {
609 g_snprintf(command, sizeof(command), "%s \"%s\"", web_command, url); 611 *ms = 0;
612 g_snprintf(command, sizeof(command), "%s\"%s\"%s", web_command, url, ms + 2);
613 }
610 614
611 args[0] = "sh"; 615 args[0] = "sh";
612 args[1] = "-c"; 616 args[1] = "-c";
613 args[2] = command; 617 args[2] = command;
614 args[3] = NULL; 618 args[3] = NULL;