[vlc-devel] commit: XSPF export: XML-encode the location ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Feb 3 18:27:55 CET 2010


vlc/vlc-1.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb  2 21:48:49 2010 +0200| [4343976eae1037397ea9f6df61f86e2983344fa3] | committer: Rémi Denis-Courmont 

XSPF export: XML-encode the location

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=4343976eae1037397ea9f6df61f86e2983344fa3
---

 modules/misc/playlist/xspf.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c
index 923d57b..31a5c71 100644
--- a/modules/misc/playlist/xspf.c
+++ b/modules/misc/playlist/xspf.c
@@ -139,12 +139,14 @@ static void xspf_export_item( playlist_item_t *p_item, FILE *p_file,
     /* -> the location */
 
     char *psz_uri = input_item_GetURI( p_item->p_input );
-
-    if( psz_uri && *psz_uri )
+    if( psz_uri )
     {
         psz = make_URI( psz_uri );
-        fprintf( p_file, "\t\t\t<location>%s</location>\n", psz );
+        psz_temp = convert_xml_special_chars( psz );
         free( psz );
+        if( *psz_temp )
+            fprintf( p_file, "\t\t\t<location>%s</location>\n", psz );
+        free( psz_temp );
     }
 
     /* -> the name/title (only if different from uri)*/




More information about the vlc-devel mailing list