urlsafeArray the join(0x00) should be join('\x00')

This commit is contained in:
djmaze 2020-08-20 07:28:08 +02:00
parent 5d402f6405
commit 226f77e392

View file

@ -29,7 +29,7 @@ import { AbstractAjaxRemote } from 'Remote/AbstractAjax';
//const toUTF8 = window.TextEncoder
// ? text => String.fromCharCode(...new TextEncoder().encode(text))
// : text => unescape(encodeURIComponent(text)),
const urlsafeArray = array => btoa(unescape(encodeURIComponent(array.join(0x00).replace(/\r\n/g, '\n'))))
const urlsafeArray = array => btoa(unescape(encodeURIComponent(array.join('\x00').replace(/\r\n/g, '\n'))))
.replace('+', '-')
.replace('/', '_')
.replace('=', '');