diff options
author | Don Scorgie <dscorgie@src.gnome.org> | 2006-02-16 18:56:59 +0000 |
---|---|---|
committer | Don Scorgie <dscorgie@src.gnome.org> | 2006-02-16 18:56:59 +0000 |
commit | a5e2d144440c3859448f9c9f91650ec1beeccfab (patch) | |
tree | 770180ddb7c37179716a91228266c68e8888d119 | |
parent | 92fc52f4489664dbde5da01923ed4dabf1e88665 (diff) | |
download | yelp-a5e2d144440c3859448f9c9f91650ec1beeccfab.tar.gz |
Escape characters when searching, fixes #331422
* src/yelp-search-pager.c:
Escape characters when searching, fixes #331422
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/yelp-search-pager.c | 11 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-02-16 Don Scorgie <don@Madaline> + + * src/yelp-search-pager.c: + Escape characters when searching, fixes #331422 + 2006-02-15 Don Scorgie <dscorgie@cvs.gnome.org> * src/yelp-print.c: diff --git a/src/yelp-search-pager.c b/src/yelp-search-pager.c index 3a38bfdc..899fcad5 100644 --- a/src/yelp-search-pager.c +++ b/src/yelp-search-pager.c @@ -1494,13 +1494,16 @@ search_process_man (YelpSearchPager *pager, gchar **terms) gchar *command; gchar *stdout_str; gint exit_code; - command = g_strconcat("apropos ", terms[i], NULL); + gchar *tmp; + tmp = g_strescape (terms[i], NULL); + command = g_strconcat("apropos ", tmp, NULL); if (g_spawn_command_line_sync (command, &stdout_str, NULL, &exit_code, NULL) && exit_code == 0) { process_man_result (pager, stdout_str, terms); } + g_free (tmp); g_free (stdout_str); g_free (command); } @@ -1516,14 +1519,18 @@ search_process_info (YelpSearchPager *pager, gchar **terms) gchar *command; gchar *stdout_str; gchar *stderr_str; + gchar *tmp; gint exit_code; - command = g_strconcat("info --apropos ", terms[i], NULL); + + tmp = g_strescape (terms[i], NULL); + command = g_strconcat("info --apropos ", tmp, NULL); if (g_spawn_command_line_sync (command, &stdout_str, &stderr_str, &exit_code, NULL) && stdout_str != NULL) { process_info_result (pager, stdout_str, terms); } + g_free (tmp); g_free (stdout_str); g_free (stderr_str); g_free (command); |