You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem seems to be, that the char + is not in the regex that searches for possible base64 chars.
line 105 shouldn't be return str.replace(/\+([A-Za-z0-9\/]*)-?/gi, function(_, chunk) {
but return str.replace(/\+([A-Za-z0-9+\/]*)-?/gi, function(_, chunk) {
This also applies if you try to decode the utf-7 version of eg. "⏩" (utf7.encode('⏩') -> "+I+k-" -> also contains a + within the base64 part).
Try this:
Output:
If I change the msg to a single word
建
, encode & decode is correct. When it msg contains 2 words it got wrong decode.Any idea ?
The text was updated successfully, but these errors were encountered: