summaryrefslogtreecommitdiff
path: root/src/loadlib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-11-12 21:59:58 +1100
committerdaurnimator <quae@daurnimator.com>2017-11-12 22:20:08 +1100
commit0a8bc0b30644c514d822fb32a184318f7353a285 (patch)
treee04468a215e76add80acafdae97d84a34f7e407c /src/loadlib.js
parent81a0e90a502faf9edebc63f54fce51aae4397e72 (diff)
downloadfengari-0a8bc0b30644c514d822fb32a184318f7353a285.tar.gz
fengari-0a8bc0b30644c514d822fb32a184318f7353a285.tar.bz2
fengari-0a8bc0b30644c514d822fb32a184318f7353a285.zip
Add lua.to_uristring
Diffstat (limited to 'src/loadlib.js')
-rw-r--r--src/loadlib.js6
1 files changed, 2 insertions, 4 deletions
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);