]> git.sesse.net Git - vlc/commitdiff
Resolving XML special chars on xml based format
authorReka Inovan <reka.inovan@gmail.com>
Sun, 29 Sep 2013 10:21:49 +0000 (17:21 +0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 12 Oct 2013 21:44:27 +0000 (23:44 +0200)
It fixes bug #9311 and resolves xml special chars on several other xml based playlist format (b4s, podcast, shoutcast, qtl).

modules/demux/playlist/b4s.c
modules/demux/playlist/podcast.c
modules/demux/playlist/qtl.c
modules/demux/playlist/shoutcast.c
modules/demux/playlist/wpl.c

index 7009195a35e193a321f4302aaca235e9ed802ee5..d9c04656b83455d2354f02968227dbfce18ed5fd 100644 (file)
@@ -32,6 +32,7 @@
 #include <vlc_common.h>
 #include <vlc_demux.h>
 #include <vlc_xml.h>
+#include <vlc_strings.h>
 
 #include "playlist.h"
 
@@ -190,6 +191,7 @@ static int Demux( demux_t *p_demux )
                 // Read the element name
                 if( !strcmp( node, "entry" ) )
                 {
+                    resolve_xml_special_chars( psz_mrl );
                     p_input = input_item_New( psz_mrl, psz_title );
                     if( psz_now )
                         input_item_SetNowPlaying( p_input, psz_now );
index 6af712b6357933fa9574b0160f5d081164488b4a..b0c44d9a59f1ee345758505d907d65058ad0dc14 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "playlist.h"
 #include <vlc_xml.h>
+#include <vlc_strings.h>
 
 /*****************************************************************************
  * Local prototypes
@@ -250,6 +251,8 @@ static int Demux( demux_t *p_demux )
                         continue;
                     }
 
+                    resolve_xml_special_chars( psz_item_mrl );
+                    resolve_xml_special_chars( psz_item_name );
                     p_input = input_item_New( psz_item_mrl, psz_item_name );
                     FREENULL( psz_item_mrl );
                     FREENULL( psz_item_name );
@@ -278,7 +281,10 @@ static int Demux( demux_t *p_demux )
 
                     /* Add the global art url to this item, if any */
                     if( psz_art_url )
+                    {
+                        resolve_xml_special_chars( psz_art_url );
                         input_item_SetArtURL( p_input, psz_art_url );
+                    }
 
                     if( psz_item_size )
                     {
index f3514d28beff7340771da6a07fff50e51e487880..958b29e0afd783c8703515c0843ac306dbc98ea9 100644 (file)
@@ -57,6 +57,7 @@ volume - 0 (mute) - 100 (max)
 
 #include "playlist.h"
 #include <vlc_xml.h>
+#include <vlc_strings.h>
 
 typedef enum { FULLSCREEN_NORMAL,
                FULLSCREEN_DOUBLE,
@@ -243,6 +244,7 @@ static int Demux( demux_t *p_demux )
         vlc_gc_decref( p_input );
         if( psz_qtnext )
         {
+            resolve_xml_special_chars( psz_qtnext );
             p_input = input_item_New( psz_qtnext, NULL );
             input_item_node_AppendItem( p_subitems, p_input );
             vlc_gc_decref( p_input );
index 9348819bbdfd6b5716de061ad6cf19eaf0ad3a93..a7d7afc0b384c91fd3bdc80750afc1f7b4023ef2 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "playlist.h"
 #include <vlc_xml.h>
+#include <vlc_strings.h>
 
 /* duplicate from modules/services_discovery/shout.c */
 #define SHOUTCAST_BASE_URL "http/shout-winamp://www.shoutcast.com/sbin/newxml.phtml"
@@ -169,6 +170,7 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
                                   psz_name ) != -1 )
                     {
                         input_item_t *p_input;
+                        resolve_xml_special_chars( psz_mrl );
                         p_input = input_item_New( psz_mrl, psz_name );
                         input_item_CopyOptions( p_input_node->p_item, p_input );
                         free( psz_mrl );
@@ -313,6 +315,7 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t *p_xml_reader,
 
                     /* Create the item */
                     input_item_t *p_input;
+                    resolve_xml_special_chars( psz_mrl );
                     p_input = input_item_New( psz_mrl, psz_name );
                     input_item_CopyOptions( p_input_node->p_item, p_input );
                     free( psz_mrl );
index a8385456b1dad8c464d1493b98c3f73fb83fe14a..365488bce85cd39ef99e38260212d9590968a2f1 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <vlc_common.h>
 #include <vlc_demux.h>
+#include <vlc_strings.h>
 
 #include "playlist.h"
 
@@ -97,6 +98,7 @@ static int Demux( demux_t *p_demux )
                 input_item_t *p_input;
 
                 *psz_parse = '\0';
+                resolve_xml_special_chars( psz_uri );
                 psz_uri = ProcessMRL( psz_uri, p_demux->p_sys->psz_prefix );
                 p_input = input_item_NewExt( psz_uri, psz_uri,
                                         0, NULL, 0, -1 );