m_subtitle_new: Store input URL in unescaped form
authorToni Gundogdu <legatvs@gmail.com>
Mon, 14 Oct 2013 13:20:47 +0000 (14 16:20 +0300)
committerToni Gundogdu <legatvs@gmail.com>
Tue, 15 Oct 2013 14:37:03 +0000 (15 17:37 +0300)
Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
src/misc/subtitle.c

index ca7052c..3d87c0d 100644 (file)
 /* -- */
 #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);
 }