forked from 0x2620/pandora
btoa takes bytes not unicde string, encode utf8 data first
This commit is contained in:
parent
8cb776eb51
commit
5413e8d8b7
1 changed files with 2 additions and 2 deletions
|
@ -124,11 +124,11 @@ pandora.ui.exportAnnotationsDialog = function(options) {
|
||||||
$link.attr({
|
$link.attr({
|
||||||
download: options.title + ' - '
|
download: options.title + ' - '
|
||||||
+ Ox.getObjectById(layers, layer).title + '.' + format,
|
+ Ox.getObjectById(layers, layer).title + '.' + format,
|
||||||
href: 'data:text/plain;base64,' + btoa(
|
href: 'data:text/plain;base64,' + btoa(Ox.encodeUTF8(
|
||||||
format == 'json'
|
format == 'json'
|
||||||
? JSON.stringify(items, null, ' ')
|
? JSON.stringify(items, null, ' ')
|
||||||
: Ox.formatSRT(items)
|
: Ox.formatSRT(items)
|
||||||
)
|
))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue