(Fixes issue 354) fixed handling of raw unicode data in browsers that supports window.btoa and window.atob
git-svn-id: https://beef.googlecode.com/svn/trunk@1020 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -8,7 +8,7 @@ beef.encode.base64 = {
|
||||
|
||||
encode : function (input) {
|
||||
if (window.btoa) {
|
||||
return btoa(input);
|
||||
return btoa(unescape(encodeURIComponent(input)));
|
||||
}
|
||||
|
||||
var output = "";
|
||||
@@ -46,7 +46,7 @@ beef.encode.base64 = {
|
||||
|
||||
decode : function (input) {
|
||||
if (window.atob) {
|
||||
return atob(input);
|
||||
return atob(escape(input));
|
||||
}
|
||||
|
||||
var output = "";
|
||||
|
||||
Reference in New Issue
Block a user