[PATCH 2/3] vimeo: encode search text in get_videos_search_params()
- From: Guillaume Emont <gemont igalia com>
- To: grilo-list gnome org
- Subject: [PATCH 2/3] vimeo: encode search text in get_videos_search_params()
- Date: Thu, 24 Feb 2011 15:38:40 +0100
This is to fix part 2. of https://bugzilla.gnome.org/show_bug.cgi?id=639965#c1
---
src/vimeo/gvimeo.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/vimeo/gvimeo.c b/src/vimeo/gvimeo.c
index 1a39ca8..402f8ba 100644
--- a/src/vimeo/gvimeo.c
+++ b/src/vimeo/gvimeo.c
@@ -95,6 +95,7 @@ static VideoInfo video_info[] = {{SIMPLE, VIMEO_VIDEO_TITLE},
{EXTENDED, VIMEO_VIDEO_OWNER}};
static void g_vimeo_finalize (GObject *object);
+static gchar * encode_uri (const gchar *uri);
/* -------------------- GOBJECT -------------------- */
@@ -162,6 +163,7 @@ get_nonce (void)
static gchar *
get_videos_search_params (GVimeo *vimeo, const gchar *text, gint page) {
+ gchar *encoded_text = encode_uri (text);
gchar *timestamp = get_timestamp ();
gchar *nonce = get_nonce ();
gchar *params = g_strdup_printf (VIMEO_VIDEO_SEARCH,
@@ -171,9 +173,10 @@ get_videos_search_params (GVimeo *vimeo, const gchar *text, gint page) {
timestamp,
page,
vimeo->priv->per_page,
- text);
+ encoded_text);
g_free (timestamp);
g_free (nonce);
+ g_free (encoded_text);
return params;
}
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]