btoa takes bytes not unicde string, encode utf8 data first

This commit is contained in:
j 2014-11-11 14:28:07 +01:00
parent 8cb776eb51
commit 5413e8d8b7

View file

@ -124,11 +124,11 @@ pandora.ui.exportAnnotationsDialog = function(options) {
$link.attr({
download: options.title + ' - '
+ Ox.getObjectById(layers, layer).title + '.' + format,
href: 'data:text/plain;base64,' + btoa(
href: 'data:text/plain;base64,' + btoa(Ox.encodeUTF8(
format == 'json'
? JSON.stringify(items, null, ' ')
: Ox.formatSRT(items)
)
))
});
}