Commit 133d8a92 authored by Daniel Tisza's avatar Daniel Tisza Committed by Rémi Denis-Courmont

Add entity encoding for input options when outputting an xml file.

Entity encoding was missing (for options) in generation of an xspf playlist.
On the reading side the entity decoding is all fine.
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
(cherry picked from commit 21f056e8c51e0c1f9ad522a41b5cfd48ea088160)
parent 1446dc4a
...@@ -208,10 +208,18 @@ xspfexportitem_end: ...@@ -208,10 +208,18 @@ xspfexportitem_end:
for( int i = 0; i < p_item->p_input->i_options; i++ ) for( int i = 0; i < p_item->p_input->i_options; i++ )
{ {
fprintf( p_file, "\t\t\t\t<vlc:option>%s</vlc:option>\n", char* psz_src = p_item->p_input->ppsz_options[i];
p_item->p_input->ppsz_options[i][0] == ':' ? char* psz_ret = NULL;
p_item->p_input->ppsz_options[i] + 1 :
p_item->p_input->ppsz_options[i] ); if ( psz_src[0] == ':' )
psz_src++;
psz_ret = convert_xml_special_chars( psz_src );
if ( psz_ret == NULL )
continue;
fprintf( p_file, "\t\t\t\t<vlc:option>%s</vlc:option>\n", psz_ret );
free( psz_ret );
} }
fputs( "\t\t\t</extension>\n", p_file ); fputs( "\t\t\t</extension>\n", p_file );
fputs( "\t\t</track>\n", p_file ); fputs( "\t\t</track>\n", p_file );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment