epiphany r8711 - branches/gnome-2-26/lib/widgets
- From: gns svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8711 - branches/gnome-2-26/lib/widgets
- Date: Tue, 20 Jan 2009 15:46:58 +0000 (UTC)
Author: gns
Date: Tue Jan 20 15:46:58 2009
New Revision: 8711
URL: http://svn.gnome.org/viewvc/epiphany?rev=8711&view=rev
Log:
Avoid adding problematic search terms with spaces
Adding spaces to the end of the location bar was adding bad search
terms. This fixes it.
Modified:
branches/gnome-2-26/lib/widgets/ephy-location-entry.c
Modified: branches/gnome-2-26/lib/widgets/ephy-location-entry.c
==============================================================================
--- branches/gnome-2-26/lib/widgets/ephy-location-entry.c (original)
+++ branches/gnome-2-26/lib/widgets/ephy-location-entry.c Tue Jan 20 15:46:58 2009
@@ -435,12 +435,17 @@
tmp = g_regex_escape_string (current, count);
term = g_regex_replace (quote_regex, tmp, -1, 0,
"", G_REGEX_MATCH_NOTEMPTY, NULL);
+ g_strstrip (term);
g_free (tmp);
- term_regex = g_regex_new (g_strstrip (term),
- G_REGEX_CASELESS | G_REGEX_OPTIMIZE,
- G_REGEX_MATCH_NOTEMPTY, NULL);
- priv->search_terms = g_slist_append (priv->search_terms, term_regex);
+ /* we don't want empty search terms */
+ if (term[0] != '\0')
+ {
+ term_regex = g_regex_new (term,
+ G_REGEX_CASELESS | G_REGEX_OPTIMIZE,
+ G_REGEX_MATCH_NOTEMPTY, NULL);
+ priv->search_terms = g_slist_append (priv->search_terms, term_regex);
+ }
g_free (term);
/* count will be incremented by the for loop */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]