##// END OF EJS Templates
comments-history: Fix Utf8 to 64 encoding
wuboo -
r4416:8708d303 default
parent child Browse files
Show More
@@ -1020,7 +1020,7 b' var CommentsController = function() {'
1020
1020
1021 initVersionSelector(versionSelectId, {results: preLoadVersionData});
1021 initVersionSelector(versionSelectId, {results: preLoadVersionData});
1022
1022
1023 $comment.attr('data-comment-text', btoa(text));
1023 $comment.attr('data-comment-text', utf8ToB64(text));
1024
1024
1025 var versionSelector = $('#comment_versions_'+comment_id);
1025 var versionSelector = $('#comment_versions_'+comment_id);
1026
1026
@@ -188,3 +188,7 b' function b64DecodeUnicode(str) {'
188 return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
188 return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
189 }).join(''));
189 }).join(''));
190 }
190 }
191
192 function utf8ToB64( str ) {
193 return window.btoa(unescape(encodeURIComponent( str )));
194 } No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now