Use utf-8 for data: URIs when downloading

This commit is contained in:
Deathamns 2014-10-21 09:38:55 +02:00
parent 5e587aa42f
commit 86222cb368
3 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ function exportUserFiltersToFile() {
if (val) { if (val) {
vAPI.download({ vAPI.download({
'url': 'data:text/plain,' + encodeURIComponent(val), 'url': 'data:text/plain;charset=utf-8,' + encodeURIComponent(val),
'filename': 'my-ublock-filters.txt' 'filename': 'my-ublock-filters.txt'
}); });
} }

View File

@ -39,7 +39,7 @@ var exportToFile = function() {
} }
vAPI.download({ vAPI.download({
'url': 'data:text/plain,' + encodeURIComponent(JSON.stringify(userData)), 'url': 'data:text/plain;charset=utf-8,' + encodeURIComponent(JSON.stringify(userData)),
'filename': 'ublock-backup.txt' 'filename': 'ublock-backup.txt'
}); });
}; };

View File

@ -97,7 +97,7 @@ var exportWhitelistToFile = function() {
if (val) { if (val) {
vAPI.download({ vAPI.download({
'url': 'data:text/plain,' + encodeURIComponent(val), 'url': 'data:text/plain;charset=utf-8,' + encodeURIComponent(val),
'filename': 'my-ublock-whitelist.txt' 'filename': 'my-ublock-whitelist.txt'
}); });
} }