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

Pierre Ynard linkfanel at yahoo.fr
Fri Feb 25 00:57:15 CET 2011

> Luckily, it happens there is a function for doing that in
> javascript. The attached patch use this function to generate a valid
> MRL. I checked the behavior of the code in presence of spaces and
> korean caracters.

Nice! However encodeURI() still leaves some characters encoded. For
example, a file name containing # will cause an error. Also, this won't
work properly on windows: backslashes will be encoded instead of being
changed to slashes.

But I'm not too sure whether it's the right place to fix this. There are
a number "VLC remote" applications, and they rely on the server-side
HTTP interface, independent of what the javascript we provide does. If
the server stops accepting mere file paths in 1.2, won't it break all of
these applications? Do we care?

> Notice that some downstream javascript functions were messing with
> quotes leading to the wrong MRL. I removed them.

Thanks for pointing that out. The issue was caused by a bug server-side
preventing the unescaping of the quotes, so that's where I fixed it.
Although the interest of escaping quotes and backslashes here is still
dubious to me.

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