diff --git a/www/js/util.js b/www/js/util.js index bd2278e..dadeb99 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -31,7 +31,9 @@ const PACK = { for(let i = 0; i < bytes.length; ++i) { str += String.fromCharCode(bytes[i]); } - return window.btoa(str); + let enc = window.btoa(str); + enc.replace("/", "-"); + return enc; }, }; @@ -129,6 +131,7 @@ const UNPACK = { return str; }, base64(data) { + data.replace("-", "/"); let str = window.atob(data); let bytes = new Uint8Array(str.length); for(let i = 0; i < bytes.length; ++i) {