Escape # character in call to g_spawn_command_line_async
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 17 Dec 2011 21:14:11 +0000 (22:14 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 17 Dec 2011 21:14:11 +0000 (22:14 +0100)
It seems that this character was being treated as a comment start.

src/ui/gui/help-menu.c

index 733580770bbea035a38432e35768b1665a1a18b5..f746441c231ebc827f63754c129a455ee763e34b 100644 (file)
@@ -95,9 +95,7 @@ online_help (const char *page)
   if (page == NULL)
     cmd = g_strdup_printf ("yelp file://%s", relocate (DOCDIR "/pspp.xml"));
   else
-    cmd = g_strdup_printf ("yelp file://%s#%s", relocate (DOCDIR "/pspp.xml"), page);
-
-  g_print ("%s\n",cmd);
+    cmd = g_strdup_printf ("yelp file://%s\\#%s", relocate (DOCDIR "/pspp.xml"), page);
 
   if ( ! g_spawn_command_line_async (cmd, &err) )
     {