[vlc-devel] [patch] [LUA HTTP] adding file:// to the Input field

Pierre Ynard linkfanel at yahoo.fr
Mon Feb 28 04:37:30 CET 2011

> Oh. Actually, there are three functions in javascript that can be
> usefull: encodeURI(), encodeURIcomponent() and escape(), they do not
> all encode the same things. I did not like encodeURIcomponent because
> it encodes the slashes. I never really did javascript before. Maybe
> escape is the one we are looking for.
> http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp
> http://www.w3schools.com/jsref/jsref_encodeURI.asp
> http://www.w3schools.com/jsref/jsref_escape.asp
> Maybe we should convert the \ into / then call escape ?

Hmm that wouldn't work because unix paths may contain backslashes that
need to be encoded, not changed into slashes. I think the only way is
to loop and encode segments separated by the directory separator on the
host running VLC. But the file browser of the lua interface doesn't even
build paths correctly, it mixes \ and / ...

Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."

More information about the vlc-devel mailing list