Skip to content

Commit

Permalink
MAGETWO-57816: [Backport] - [GitHub] UTF-8 special character issue in…
Browse files Browse the repository at this point in the history
… widgets #4232 - for 2.0
  • Loading branch information
OlgaVasyltsun committed May 15, 2017
1 parent 54d4e70 commit 8de27ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/web/legacy-build.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions lib/web/mage/adminhtml/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ var Base64 = {
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;

input = Base64._utf8_encode(input);

if( typeof window.btoa === "function" ){
return window.btoa(input);
}

input = Base64._utf8_encode(input);

while (i < input.length) {

chr1 = input.charCodeAt(i++);
Expand Down Expand Up @@ -370,7 +370,7 @@ var Base64 = {
var i = 0;

if( typeof window.atob === "function" ){
return window.atob(input);
return Base64._utf8_decode(window.atob(input));
}

input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
Expand All @@ -395,8 +395,8 @@ var Base64 = {
output = output + String.fromCharCode(chr3);
}
}
output = Base64._utf8_decode(output);
return output;

return Base64._utf8_decode(output);
},

mageEncode: function(input){
Expand Down

0 comments on commit 8de27ea

Please sign in to comment.