From 5fa974e614fc901224f5dba21bfa4da0de96e0d7 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Wed, 2 Apr 2014 11:07:01 +0200 Subject: [PATCH] Support for EPUB 3 spine-level SVG components --- epub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epub.js b/epub.js index c43264a..fb4db00 100644 --- a/epub.js +++ b/epub.js @@ -638,7 +638,7 @@ EPub.prototype.getChapter = function (id, callback) { EPub.prototype.getChapterRaw = function (id, callback) { if (this.manifest[id]) { - if ((this.manifest[id]['media-type'] || "").toLowerCase().trim() != "application/xhtml+xml") { + if (!(this.manifest[id]['media-type'] == "application/xhtml+xml" || this.manifest[id]['media-type'] == "image/svg+xml")) { return callback(new Error("Invalid mime type for chapter")); }