Closed kokic closed 1 year ago
I remember when I first wrote that function, I realised unescape
was deprecated, but the alternatives I found had issues with some characters (I don't remember which character class now, maybe emoji). I don't remember whether I tried TextEncoder
, though. I'll try it out, and if it works, I'll replace the current implementation. Thanks for the suggestion :)
This has been fixed in https://github.com/varkor/quiver/commit/2895900bfab72f08bdacce457f305571c75595de.
I noticed in the source code that the base64 encoding for
QuiverImportExport.base64.export
usesunescape
, but as pointed out here unescape() - JavaScript | MDN,unescape
is non-standard and no longer recommended (deprecated).At the same time, the
unescape
-encodeURIComponent
trick can be replaced byString.fromCharCode(...encoder.encode(_))
, where the encoder is aTextEncoder
object.e.g.
This is a somewhat offensive suggestion, please forgive me. If you choose to keep using
unescape
for any other purpose, please ignore and close this issue.