From 906b2920fd6547852f4f9de6ce04d6085fdc5748 Mon Sep 17 00:00:00 2001 From: Michael Atwood Date: Mon, 29 Feb 2016 20:15:56 -0500 Subject: [PATCH] Fix for IE10 Quote/Apostrophe * In books with proper quotes and apostrophes IE will cut off the text * node at the character. This breaks loading CFIs with text offsets. The * fix was to change proper quotes/apostrohpes to ' and ". Fixing merge issue. --- js/Readium.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/Readium.js b/js/Readium.js index 53c940a73..077752d12 100644 --- a/js/Readium.js +++ b/js/Readium.js @@ -64,6 +64,12 @@ define(['readium_shared_js/globals', 'text!version.json', 'jquery', 'underscore' contentDocumentHtml = contentDocumentHtml.replace(/[\s]*<\/title>/g, '<title>TITLE'); contentDocumentHtml = contentDocumentHtml.replace(//g, 'TITLE'); + // Replace quotes < IE 10 cannot handle proper quoting when traversting textNodes. + contentDocumentHtml = contentDocumentHtml.replace(/(“)/g, '"'); // “ + contentDocumentHtml = contentDocumentHtml.replace(/(”)/g, '"'); // ” + // Replace apostrophes + contentDocumentHtml = contentDocumentHtml.replace(/(’)/g, '\''); // ’ + return contentDocumentHtml; };