Skip to content

Commit

Permalink
Workaround for #230
Browse files Browse the repository at this point in the history
  • Loading branch information
eligrey committed May 27, 2016
1 parent 53b6226 commit 8e64e56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions FileSaver.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* FileSaver.js
* A saveAs() FileSaver implementation.
* 1.2.1
* 1.2.2
*
* By Eli Grey, http://eligrey.com
* License: MIT
Expand Down Expand Up @@ -84,9 +84,9 @@ var saveAs = saveAs || (function(view) {
}
, auto_bom = function(blob) {
// prepend BOM for UTF-8 XML and text/* types (including HTML)
// note: your browser will automatically convert UTF-16 \uFEFF to EF BB BF
// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
return new Blob(["\uFEFF", blob], {type: blob.type});
return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});
}
return blob;
}
Expand Down
2 changes: 1 addition & 1 deletion FileSaver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8e64e56

Please sign in to comment.