Skip to content

Commit 8e64e56

Browse files
committed
Workaround for eligrey#230
1 parent 53b6226 commit 8e64e56

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

FileSaver.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* FileSaver.js
22
* A saveAs() FileSaver implementation.
3-
* 1.2.1
3+
* 1.2.2
44
*
55
* By Eli Grey, http://eligrey.com
66
* License: MIT
@@ -84,9 +84,9 @@ var saveAs = saveAs || (function(view) {
8484
}
8585
, auto_bom = function(blob) {
8686
// prepend BOM for UTF-8 XML and text/* types (including HTML)
87-
// note: your browser will automatically convert UTF-16 \uFEFF to EF BB BF
87+
// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
8888
if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
89-
return new Blob(["\uFEFF", blob], {type: blob.type});
89+
return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});
9090
}
9191
return blob;
9292
}

FileSaver.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)