]> git.sesse.net Git - vlc/blobdiff - share/http/js/vlm.js
Fix error in javascript "playlist xml" -> html routine which messed up display of...
[vlc] / share / http / js / vlm.js
index a89880e09439b985d2bab72885307b41a6b14c5f..daa3f2a5a4c4b4fcfa7d80035c42a8e7623f289a 100644 (file)
@@ -153,7 +153,7 @@ function vlm_schedule_type_change( name )
 
 function sanitize_input( str )
 {
-    return str.replace( /\\/g, '\\\\').replace( /\'/g, '\\\'' ).replace( /\"/g, '\\\"' ).replace( /^/, '"' ).replace( /$/, '"' );
+    return str.replace( /\"/g, '\\\"' ).replace( /^/, '"' ).replace( /$/, '"' ).replace( /\ option\ /g, '" option "' );
 }
 
 function update_vlm_add_broadcast()
@@ -635,7 +635,7 @@ function parse_vlm_elements()
 
 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( )