--- man.c 2004/02/29 04:29:06 0.1 +++ man.c 2004/02/29 04:30:32 0.2 @@ -751,10 +751,10 @@ But it changes the meaning of man_file and cat_file, if these are not absolute. */ - command = my_xsprintf("(cd %S && %s | %S > %S)", path, + command = my_xsprintf("(cd \"%S\" && %s | %S > %S)", path, roff_command, getval("COMPRESS"), cat_file); else - command = my_xsprintf ("(cd %S && %s > %S)", path, + command = my_xsprintf ("(cd \"%S\" && %s > %S)", path, roff_command, cat_file); /* @@ -799,9 +799,9 @@ if (roff_command == NULL) return 0; if (do_troff) - command = my_xsprintf ("(cd %S && %s)", path, roff_command); + command = my_xsprintf ("(cd \"%S\" && %s)", path, roff_command); else - command = my_xsprintf ("(cd %S && %s | %s)", path, + command = my_xsprintf ("(cd \"%S\" && %s | %s)", path, roff_command, pager); return !do_system_command (command, 0); @@ -910,7 +910,7 @@ if (roff_command == NULL) return 0; - command = my_xsprintf("(cd %S && %s)", path, roff_command); + command = my_xsprintf("(cd \"%S\" && %s)", path, roff_command); return !do_system_command (command, 0); } --- util.c 2004/02/29 04:20:16 0.1 +++ util.c 2004/02/29 04:31:54 0.2 @@ -241,7 +241,7 @@ static int is_shell_safe(const char *ss, int quoted) { - char *bad = " ;'\\\"<>|"; + char *bad = ";'\\\"<>|"; char *p; if (quoted)