From 0a8bc0b30644c514d822fb32a184318f7353a285 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 12 Nov 2017 21:59:58 +1100 Subject: Add lua.to_uristring --- src/lauxlib.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lauxlib.js') diff --git a/src/lauxlib.js b/src/lauxlib.js index 8d110ea..62fc6f3 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -740,8 +740,7 @@ if (WEB) { } else { lua.lua_pushfstring(L, lua.to_luastring("@%s"), filename); - let path = lua.to_jsstring(filename); - path = encodeURI(path); + let path = lua.to_uristring(filename); let xhr = new XMLHttpRequest(); xhr.open("GET", path, false); // TODO: find a way to load bytes instead of js string -- cgit v1.2.3-54-g00ecf