[vlc-devel] [patch] [LUA HTTP] adding file:// to the Input field
Erik Saule
esaule at bmi.osu.edu
Wed Feb 23 04:28:36 CET 2011
> > No. I am saying it is more complicated than that and even than
> > replacing white spaces with %20. It's complicated enough that we have
> > a dedicated helper function in C code.
>
> You have to replace many invalid characters by % codes. If you don't,
> the resulting URI will be invalid even if it still works, but if there
> are non-ASCII characters in the file path it will be a problem.
>
> See the function make_URI() in src/text/strings.c, you'll have to do all
> of that in the javascript.
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.
Notice that some downstream javascript functions were messing with
quotes leading to the wrong MRL. I removed them.
Do you see more issues with this patch?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-LUA-HTTP-making-the-input-field-a-valid-MRL-when-usi.patch
Type: text/x-diff
Size: 2336 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110222/d4261a66/attachment.patch>
More information about the vlc-devel
mailing list