diff options
| author | Chris Price <studiochris@users.noreply.github.com> | 2014-08-18 22:26:49 -0400 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-08-20 10:38:50 +0100 |
| commit | 76adc351b75b2489f3ef009a7e39df3dabadb50d (patch) | |
| tree | b12e26a3e3aa3f19ce30f25bda731c414e01d9c2 /lib | |
| parent | 1ff800d5148068531419b179c8b9257ba9bd2e55 (diff) | |
Remove potential Unicode BOM after reading XML file
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/office-xml-reader.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/docx/office-xml-reader.js b/lib/docx/office-xml-reader.js index 39b700e..861b11e 100644 --- a/lib/docx/office-xml-reader.js +++ b/lib/docx/office-xml-reader.js @@ -22,6 +22,9 @@ function read(xmlString) { function readXmlFromZipFile(docxFile, path) { if (docxFile.exists(path)) { return docxFile.read(path, "utf-8") + .then(function (xmlString) { + return xmlString.replace(/^\uFEFF/g, ''); + }) .then(read); } else { return promises.resolve(null); |
