Skip to content

Commit

Permalink
fixed issue with saving to dropbox with special language characters. …
Browse files Browse the repository at this point in the history
…Encoding using utf-8 and base64. Dropbox handles the decoding
  • Loading branch information
regulator95 committed Mar 12, 2016
1 parent 7dc851b commit 8ad5ca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/save_xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function bind_save_dropbox () {
output_string = get_xml_string();
filename = get_filename(personal_information);
Dropbox.save({
files: [ {'url': 'data:application/xml,' + output_string, 'filename': filename } ],
files: [ {'url': 'data:application/xml;base64,' + btoa(unescape(encodeURIComponent(output_string))), 'filename': filename } ],
success: function () { $("#save_personal_history_dialog").dialog("close");},
error: function (errorMessage) { alert ("ERROR:" + errorMessage);}
});
Expand Down

0 comments on commit 8ad5ca6

Please sign in to comment.