Merge commit 'refs/pullreqs/59'

This commit is contained in:
Omar Rizwan 2021-03-14 15:39:01 -07:00
commit 49fea2b7e8

View file

@ -32,7 +32,7 @@ function pathComponent(path, i) {
const components = path.split('/'); const components = path.split('/');
return components[i >= 0 ? i : components.length + i]; return components[i >= 0 ? i : components.length + i];
} }
function sanitize(s) { return s.replace(/[^A-Za-z0-9_\-\.]/gm, '_'); } function sanitize(s) { return s.replace(/[\/]/gm, '_'); }
const stringToUtf8Array = (function() { const stringToUtf8Array = (function() {
const encoder = new TextEncoder("utf-8"); const encoder = new TextEncoder("utf-8");
return str => encoder.encode(str); return str => encoder.encode(str);