From 3b2a19d3182a28a21b759fea83edf3ba3a157aab Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Mon, 14 Oct 2013 16:20:47 +0300 Subject: [PATCH] m_subtitle_new: Store input URL in unescaped form Signed-off-by: Toni Gundogdu --- src/misc/subtitle.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/misc/subtitle.c b/src/misc/subtitle.c index ca7052c..3d87c0d 100644 --- a/src/misc/subtitle.c +++ b/src/misc/subtitle.c @@ -29,14 +29,25 @@ /* -- */ #include "misc/subtitle.h" #include "misc/slst.h" +#include "misc/url.h" gpointer m_subtitle_new(_quvi_t q, const gchar *url) { - _quvi_subtitle_t qsub = g_new0(struct _quvi_subtitle_s, 1); - /* URL */ - qsub->url.input = g_string_new(url); - /* Handle */ + _quvi_subtitle_t qsub; + gchar *u; + + qsub = g_new0(struct _quvi_subtitle_s, 1); qsub->handle.quvi = q; + + /* + * 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); + qsub->url.input = g_string_new(u); + g_free(u); + return (qsub); } -- 2.11.4.GIT