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/loadlib.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/loadlib.js') diff --git a/src/loadlib.js b/src/loadlib.js index 8ae758b..49f2715 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -38,8 +38,7 @@ const AUXMARK = [1]; let lsys_load; if (WEB) { lsys_load = function(L, path, seeglb) { - path = lua.to_jsstring(path); - path = encodeURI(path); + path = lua.to_uristring(path); let xhr = new XMLHttpRequest(); xhr.open("GET", path, false); xhr.send(); @@ -129,8 +128,7 @@ if (!WEB) { } else { /* TODO: use async/await ? */ readable = function(path) { - path = lua.to_jsstring(path); - path = encodeURI(path); + path = lua.to_uristring(path); let xhr = new XMLHttpRequest(); /* Following GET request done by searcher_Web will be cached */ xhr.open("GET", path, false); -- cgit v1.2.3-54-g00ecf