summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-03-11 09:38:18 +0100
committerSamy Pessé <samypesse@gmail.com>2015-03-11 09:38:18 +0100
commit960848ba343866859896bea42fd10c7e9a717636 (patch)
tree0011787d03ddeb1ba097103cd63724baf9995a4f
parentd9aca7a9dfebc10a0c2cd22aa8f0821dd4ff613c (diff)
downloadgitbook-960848ba343866859896bea42fd10c7e9a717636.zip
gitbook-960848ba343866859896bea42fd10c7e9a717636.tar.gz
gitbook-960848ba343866859896bea42fd10c7e9a717636.tar.bz2
Ensure inline svgs have xml header
-rw-r--r--lib/utils/page.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js
index 0205ec0..dade47b 100644
--- a/lib/utils/page.js
+++ b/lib/utils/page.js
@@ -105,7 +105,7 @@ function normalizeHtml(src, options) {
// Generate filename
dest = "/"+fs.getUniqueFilename(outputRoot, dest);
- svgContent[dest] = content;
+ svgContent[dest] = '<?xml version="1.0" encoding="UTF-8"?>'+content;
$(this).replaceWith($("<img>").attr("src", dest));
});
}