mirror of
https://github.com/osnr/TabFS.git
synced 2024-05-10 17:46:34 +02:00
Allow all characters (except /) when sanitazing
This commit is contained in:
parent
82a1d6722d
commit
d918d93bbc
|
@ -32,7 +32,7 @@ function pathComponent(path, i) {
|
|||
const components = path.split('/');
|
||||
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 encoder = new TextEncoder("utf-8");
|
||||
return str => encoder.encode(str);
|
||||
|
|
Loading…
Reference in a new issue