From 3e5cb7da70bfd3fb1171ffb6f2bb44d8aee7cd72 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Mon, 14 Oct 2013 16:10:03 +0300 Subject: [PATCH] m_media_new: Store input URL in unescaped form Signed-off-by: Toni Gundogdu --- src/misc/media.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/misc/media.c b/src/misc/media.c index ba4ed35..96ee8d7 100644 --- a/src/misc/media.c +++ b/src/misc/media.c @@ -29,19 +29,31 @@ /* -- */ #include "misc/media.h" #include "misc/slst.h" +#include "misc/url.h" gpointer m_media_new(_quvi_t q, const gchar *url) { - _quvi_media_t qm = g_new0(struct _quvi_media_s, 1); - /* URL */ + _quvi_media_t qm; + gchar *u; + + qm = g_new0(struct _quvi_media_s, 1); + qm->url.redirect_to = g_string_new(NULL); qm->url.thumbnail = g_string_new(NULL); - qm->url.input = g_string_new(url); - /* Handle */ - qm->handle.quvi = q; - /* Other */ + + /* + * Store the input URL in the unescaped form which is what the `ident' + * functions of the scripts expect when the support check is run + * offline. + */ + u = m_url_unescaped_form(url); + qm->url.input = g_string_new(u); + g_free(u); + qm->title = g_string_new(NULL); qm->id = g_string_new(NULL); + qm->handle.quvi = q; + return (qm); } -- 2.11.4.GIT