diff --git a/core/modules/savers/download.js b/core/modules/savers/download.js index 623285561..d0d7e6989 100644 --- a/core/modules/savers/download.js +++ b/core/modules/savers/download.js @@ -28,7 +28,12 @@ DownloadSaver.prototype.save = function(text) { // Set up the link var link = document.createElement("a"); link.setAttribute("target","_blank"); - link.setAttribute("href","data:text/html," + encodeURIComponent(text)); + if(Blob != undefined) { + var blob = new Blob([encodeURIComponent(text)], {type: "text/html"}); + link.setAttribute("href", URL.createObjectURL(blob)); + } else { + link.setAttribute("href","data:text/html," + encodeURIComponent(text)); + } link.setAttribute("download",filename); document.body.appendChild(link); link.click();