summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wu2017-02-03 18:28:05 +0800
committerGitHub2017-02-03 18:28:05 +0800
commita261c8e812282feeccd15b769a3b074bf52bfc74 (patch)
tree9ec03dd011e2e2b067844c8a99ec0cc9039e71fc
parente67a6ad3685289437e510906eeffb0d764ba4a37 (diff)
parent5a212b933548ccc5ef1cd45d8b86d7d86c8f7b9e (diff)
Merge pull request #341 from nvsofts/fix_bom_utf8
Removed UTF-8 BOM in download function
Diffstat (limited to '')
-rw-r--r--public/js/cover.js2
-rw-r--r--public/js/extra.js4
-rw-r--r--public/js/index.js4
3 files changed, 5 insertions, 5 deletions
diff --git a/public/js/cover.js b/public/js/cover.js
index 830564e8..bc6e73f9 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -325,7 +325,7 @@ $(".ui-save-history").click(() => {
const blob = new Blob([history], {
type: "application/json;charset=utf-8"
});
- saveAs(blob, `hackmd_history_${moment().format('YYYYMMDDHHmmss')}`);
+ saveAs(blob, `hackmd_history_${moment().format('YYYYMMDDHHmmss')}`, true);
});
});
diff --git a/public/js/extra.js b/public/js/extra.js
index b0a4bdcb..39812fd8 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -603,7 +603,7 @@ export function exportToRawHTML(view) {
const blob = new Blob([html], {
type: "text/html;charset=utf-8"
});
- saveAs(blob, filename);
+ saveAs(blob, filename, true);
}
//extract markdown body to html and compile to template
@@ -635,7 +635,7 @@ export function exportToHTML(view) {
const blob = new Blob([html], {
type: "text/html;charset=utf-8"
});
- saveAs(blob, filename);
+ saveAs(blob, filename, true);
});
});
}
diff --git a/public/js/index.js b/public/js/index.js
index 56f4fd38..dd26d379 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1542,7 +1542,7 @@ ui.toolbar.download.markdown.click(function (e) {
var blob = new Blob([markdown], {
type: "text/markdown;charset=utf-8"
});
- saveAs(blob, filename);
+ saveAs(blob, filename, true);
});
//html
ui.toolbar.download.html.click(function (e) {
@@ -1922,7 +1922,7 @@ $('#revisionModalDownload').click(function () {
var blob = new Blob([revision.content], {
type: "text/markdown;charset=utf-8"
});
- saveAs(blob, filename);
+ saveAs(blob, filename, true);
});
$('#revisionModalRevert').click(function () {
if (!revision) return;