RESOLVED WONTFIX123830
window.atob() does not remove space characters from input
https://bugs.webkit.org/show_bug.cgi?id=123830
Summary window.atob() does not remove space characters from input
Chris Dumez
Reported 2013-11-05 14:32:17 PST
window.atob() does not remove space characters from input as mandated by the specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#dom-windowbase64-atob (Step 3) As a result, base64 decoding will fail if the input string contains HTML space characters [1]. This is covered by the following test suite: http://www.w3c-test.org/html/tests/submission/AryehGregor/base64.html Our behavior is consistent with other browsers (Tested Blink, latest Firefox and IE10) so I initially tried to get the specification changed: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22731 However, the feedback on that bug is that we "should improve the implementation in browser as this change was made on purpose and it's common to have white space in base64 data". [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character I am pushing the same change to Blink: https://codereview.chromium.org/58143002/
Attachments
Patch (24.85 KB, patch)
2013-11-05 14:53 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2013-11-05 14:53:24 PST
Chris Dumez
Comment 3 2013-11-06 10:23:52 PST
(In reply to comment #2) > (From update of attachment 216084 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=216084&action=review > > > Source/WTF/ChangeLog:14 > > + http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character > > I posted some pushback to <https://www.w3.org/Bugs/Public/show_bug.cgi?id=22731> that you filed. I saw, thanks. Let's see how it goes.
Darin Adler
Comment 4 2014-07-12 17:19:50 PDT
Comment on attachment 216084 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=216084&action=review >>> Source/WTF/ChangeLog:14 >>> + http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character >> >> I posted some pushback to <https://www.w3.org/Bugs/Public/show_bug.cgi?id=22731> that you filed. > > I saw, thanks. Let's see how it goes. Alexey, do you think this is resolved yet? I’d like to land or review- this patch!
Note You need to log in before you can comment on or make changes to this bug.