diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-05-12 03:08:24 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-05-12 03:08:24 +0800 |
commit | d5907b653b7fe8c1830563b56c44bc1016c94ba1 (patch) | |
tree | f3068aed960ff808270e37140cf7cbe4ce927b1b /src/bookmarks | |
parent | cb3c864677acdb69f6c3e71d4c2624482ea7ddc6 (diff) | |
download | gsoc2013-epiphany-d5907b653b7fe8c1830563b56c44bc1016c94ba1.tar gsoc2013-epiphany-d5907b653b7fe8c1830563b56c44bc1016c94ba1.tar.gz gsoc2013-epiphany-d5907b653b7fe8c1830563b56c44bc1016c94ba1.tar.bz2 gsoc2013-epiphany-d5907b653b7fe8c1830563b56c44bc1016c94ba1.tar.lz gsoc2013-epiphany-d5907b653b7fe8c1830563b56c44bc1016c94ba1.tar.xz gsoc2013-epiphany-d5907b653b7fe8c1830563b56c44bc1016c94ba1.tar.zst gsoc2013-epiphany-d5907b653b7fe8c1830563b56c44bc1016c94ba1.zip |
Fix google smart bookmarks to use utf8
2003-05-11 Marco Pesenti Gritti <marco@it.gnome.org>
* data/starthere/smartbookmarks.xml.in:
Fix google smart bookmarks to use utf8
* src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_solve_smart_url):
Fix google smart bookmarks to use utf8.
Escape the search string before merging it in the url.
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index b67e5cd11..529ad0d5d 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -28,6 +28,7 @@ #include <string.h> #include <libgnome/gnome-i18n.h> +#include <libgnomevfs/gnome-vfs-utils.h> #define EPHY_BOOKMARKS_XML_VERSION "0.1" @@ -58,7 +59,7 @@ static const EphyBookmarksBookmarkInfo default_bookmarks [] = * "http://www.google.nl" and "http://www.google.nl/search?q=%s" */ - { N_("Search the web"), N_("http://www.google.com"), N_("http://www.google.com/search?q=%s") } + { N_("Search the web"), N_("http://www.google.com"), N_("http://www.google.com/search?q=%s&ie=UTF-8&oe=UTF-8") } }; static int n_default_bookmarks = G_N_ELEMENTS (default_bookmarks); @@ -907,6 +908,7 @@ ephy_bookmarks_solve_smart_url (EphyBookmarks *eb, gchar *encoding; gchar *smarturl_only; gchar *arg; + gchar *escaped_arg; g_return_val_if_fail (content != NULL, NULL); @@ -922,17 +924,19 @@ ephy_bookmarks_solve_smart_url (EphyBookmarks *eb, arg = g_convert (content, strlen (content), encoding, "UTF-8", NULL, NULL, NULL); + escaped_arg = gnome_vfs_escape_string (arg); t1 = smarturl_only; t2 = strstr (t1, "%s"); g_return_val_if_fail (t2 != NULL, NULL); g_string_append_len (s, t1, t2 - t1); - g_string_append (s, arg); + g_string_append (s, escaped_arg); t1 = t2 + 2; g_string_append (s, t1); ret = g_string_free (s, FALSE); g_free (arg); + g_free (escaped_arg); g_free (encoding); g_free (smarturl_only); |