(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:
antisnatchor
2011-06-25 17:11:07 +00:00
parent 0d779184b0
commit 10d8a1dc6d

View File

@@ -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 = "";