From 6df6452619c80c42c03739628b6c02ec8f46fe7c Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 21 Apr 2015 08:03:03 +0300 Subject: [PATCH] Update FileSaver.js to v2015-03-04. [ci skip] --- docs/assets/js/vendor/FileSaver.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/assets/js/vendor/FileSaver.js b/docs/assets/js/vendor/FileSaver.js index 20ebeb21dd..c8f36fb4b9 100644 --- a/docs/assets/js/vendor/FileSaver.js +++ b/docs/assets/js/vendor/FileSaver.js @@ -1,6 +1,6 @@ /* FileSaver.js * A saveAs() FileSaver implementation. - * 2015-01-04 + * 2015-03-04 * * By Eli Grey, http://eligrey.com * License: X11/MIT @@ -135,6 +135,10 @@ var saveAs = saveAs revoke(object_url); return; } + // prepend BOM for UTF-8 XML and text/plain types + if (/^\s*(?:text\/(?:plain|xml)|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { + blob = new Blob(["\ufeff", blob], {type: blob.type}); + } // Object and web filesystem URLs have a problem saving in Google Chrome when // viewed in a tab, so I force save with application/octet-stream // http://code.google.com/p/chromium/issues/detail?id=91158