|
@@ -24,6 +24,7 @@ this.SingleFile = this.SingleFile || (() => {
|
|
|
|
|
|
|
|
const ONE_MB = 1024 * 1024;
|
|
const ONE_MB = 1024 * 1024;
|
|
|
const DEBUG = false;
|
|
const DEBUG = false;
|
|
|
|
|
+ const PREFIX_DATA_URI_TEXT = "data:text/";
|
|
|
|
|
|
|
|
// --------
|
|
// --------
|
|
|
// Download
|
|
// Download
|
|
@@ -102,6 +103,9 @@ this.SingleFile = this.SingleFile || (() => {
|
|
|
return "data:base64,";
|
|
return "data:base64,";
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ if (!contentType.startsWith(PREFIX_DATA_URI_TEXT)) {
|
|
|
|
|
+ return "";
|
|
|
|
|
+ }
|
|
|
if (!charSet) {
|
|
if (!charSet) {
|
|
|
const matchCharset = contentType && contentType.match(/\s*;\s*charset\s*=\s*"?([^";]*)"?(;|$)/i);
|
|
const matchCharset = contentType && contentType.match(/\s*;\s*charset\s*=\s*"?([^";]*)"?(;|$)/i);
|
|
|
if (matchCharset && matchCharset[1] || options.charSet) {
|
|
if (matchCharset && matchCharset[1] || options.charSet) {
|