summaryrefslogtreecommitdiffstats
path: root/lib/utils
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-10-20 17:22:01 +0200
committerSamy Pessé <samypesse@gmail.com>2015-10-20 17:22:01 +0200
commitcbdcdb1e0ff4f26161803d0d839dfb9eb4a143fd (patch)
tree344601d05858ad5712f7e428e6e586ee373866d4 /lib/utils
parent4fea85289e1d2cf41bd94656033b8b5748d80bd8 (diff)
downloadgitbook-cbdcdb1e0ff4f26161803d0d839dfb9eb4a143fd.zip
gitbook-cbdcdb1e0ff4f26161803d0d839dfb9eb4a143fd.tar.gz
gitbook-cbdcdb1e0ff4f26161803d0d839dfb9eb4a143fd.tar.bz2
Fix #974: correctly handle query in image urls
Diffstat (limited to 'lib/utils')
-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 8adce8f..c79f237 100644
--- a/lib/utils/page.js
+++ b/lib/utils/page.js
@@ -132,7 +132,7 @@ function normalizeHtml(src, options) {
// If image is external and ebook, then downlaod the images
if (isExternal) {
origin = src;
- src = '/'+crc.crc32(origin).toString(16)+path.extname(origin);
+ src = '/'+crc.crc32(origin).toString(16)+path.extname(url.parse(origin).pathname);
src = links.toAbsolute(src, options.base, options.output);
isExternal = false;
}