Commit 2ec45e6f authored by Antoine Cellerier's avatar Antoine Cellerier

URL encode fix

parent bcb8ad99
...@@ -287,7 +287,7 @@ function in_play() ...@@ -287,7 +287,7 @@ function in_play()
var input = value('input_mrl'); var input = value('input_mrl');
if( value('sout_mrl') != '' ) if( value('sout_mrl') != '' )
input += ' '+value('sout_mrl'); input += ' '+value('sout_mrl');
var url = 'requests/status.xml?command=in_play&input='+escape( input ); var url = 'requests/status.xml?command=in_play&input='+encodeURIComponent( input );
loadXMLDoc( url, parse_status ); loadXMLDoc( url, parse_status );
setTimeout( 'update_playlist()', 1000 ); setTimeout( 'update_playlist()', 1000 );
} }
...@@ -296,7 +296,7 @@ function in_enqueue() ...@@ -296,7 +296,7 @@ function in_enqueue()
var input = value('input_mrl'); var input = value('input_mrl');
if( value('sout_mrl') != '' ) if( value('sout_mrl') != '' )
input += ' '+value('sout_mrl'); input += ' '+value('sout_mrl');
var url = 'requests/status.xml?command=in_enqueue&input='+escape( input ); var url = 'requests/status.xml?command=in_enqueue&input='+encodeURIComponent( input );
loadXMLDoc( url, parse_status ); loadXMLDoc( url, parse_status );
setTimeout( 'update_playlist()', 1000 ); setTimeout( 'update_playlist()', 1000 );
} }
...@@ -1022,7 +1022,7 @@ function browse( dest ) ...@@ -1022,7 +1022,7 @@ function browse( dest )
function browse_dir( dir ) function browse_dir( dir )
{ {
document.getElementById( 'browse_lastdir' ).value = dir; document.getElementById( 'browse_lastdir' ).value = dir;
loadXMLDoc( 'requests/browse.xml?dir='+escape(dir), parse_browse_dir ); loadXMLDoc( 'requests/browse.xml?dir='+encodeURIComponent(dir), parse_browse_dir );
} }
function browse_path( p ) function browse_path( p )
{ {
......
...@@ -635,7 +635,7 @@ function parse_vlm_elements() ...@@ -635,7 +635,7 @@ function parse_vlm_elements()
function vlm_cmd( cmd ) function vlm_cmd( cmd )
{ {
loadXMLDoc( 'requests/vlm_cmd.xml?command='+cmd.replace(/\#/g, '%23'), parse_vlm_cmd ); loadXMLDoc( 'requests/vlm_cmd.xml?command='+encodeURIComponent(cmd), parse_vlm_cmd );
} }
function vlm_get_elements( ) function vlm_get_elements( )
......
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