mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Small revision to previous commit, avoids double encoding.
We don't need to encodeURIComponent at all when using blob links. The data never goes into the dom directly, just a guid reference. This makes saving with blobs very fast!
This commit is contained in:
parent
aef8e63cf8
commit
c45f4d1c62
@ -29,7 +29,7 @@ DownloadSaver.prototype.save = function(text) {
|
||||
var link = document.createElement("a");
|
||||
link.setAttribute("target","_blank");
|
||||
if(Blob != undefined) {
|
||||
var blob = new Blob([encodeURIComponent(text)], {type: "text/html"});
|
||||
var blob = new Blob([text], {type: "text/html"});
|
||||
link.setAttribute("href", URL.createObjectURL(blob));
|
||||
} else {
|
||||
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
|
||||
|
Loading…
Reference in New Issue
Block a user