diff options
author | Don Scorgie <dscorgie@src.gnome.org> | 2006-02-18 14:50:38 +0000 |
---|---|---|
committer | Don Scorgie <dscorgie@src.gnome.org> | 2006-02-18 14:50:38 +0000 |
commit | 32a626074a7d4879a1a421e36d1eb45e239c6429 (patch) | |
tree | e67d96f4ff85825b643c51390d63931143454d8e | |
parent | 968a09cf268b3078cd41778e99eb731af3ed752e (diff) | |
download | yelp-32a626074a7d4879a1a421e36d1eb45e239c6429.tar.gz |
Escape ' characters when searching
* src/yelp-search-pager.c:
Escape ' characters when searching
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/yelp-search-pager.c | 15 |
2 files changed, 14 insertions, 8 deletions
@@ -1,3 +1,8 @@ +2006-02-18 Don Scorgie <dscorgie@cvs.gnome.org> + + * src/yelp-search-pager.c: + Escape ' characters when searching + 2006-02-16 Brent Smith <gnome@nextreality.net> * src/yelp-html.cpp: @@ -9,7 +14,7 @@ set MOZ_DISABLE_PANGO in the environment to fix broken rendering of certain characters, fixes #329461 -2006-02-16 Don Scorgie <don@Madaline> +2006-02-16 Don Scorgie <dscorgie@cvs.gnome.org> * src/yelp-search-pager.c: Escape characters when searching, fixes #331422 diff --git a/src/yelp-search-pager.c b/src/yelp-search-pager.c index 899fcad5..293bccae 100644 --- a/src/yelp-search-pager.c +++ b/src/yelp-search-pager.c @@ -1211,7 +1211,6 @@ slow_search_process (YelpSearchPager *pager) break; } } - /* Cleanup the container and delete it */ g_free (c->current_subsection); g_free (c->result_subsection); @@ -1492,12 +1491,14 @@ search_process_man (YelpSearchPager *pager, gchar **terms) gint i=0; for (i=0; terms[i]; i++) { gchar *command; - gchar *stdout_str; + gchar *stdout_str = NULL; gint exit_code; - gchar *tmp; + gchar *tmp = NULL; + tmp = g_strescape (terms[i], NULL); + tmp = g_strdelimit (tmp, "\'", '\''); 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); @@ -1507,7 +1508,6 @@ search_process_man (YelpSearchPager *pager, gchar **terms) g_free (stdout_str); g_free (command); } - return; } @@ -1517,12 +1517,13 @@ search_process_info (YelpSearchPager *pager, gchar **terms) gint i=0; for (i=0; terms[i]; i++) { gchar *command; - gchar *stdout_str; - gchar *stderr_str; + gchar *stdout_str = NULL; + gchar *stderr_str = NULL; gchar *tmp; gint exit_code; tmp = g_strescape (terms[i], NULL); + tmp = g_strdelimit (tmp, "\'", '\''); command = g_strconcat("info --apropos ", tmp, NULL); if (g_spawn_command_line_sync (command, &stdout_str, &stderr_str, |