From: Kim Nguyễn Date: Wed, 23 Sep 2015 16:17:01 +0000 (+0200) Subject: Fix titles with & inside. X-Git-Url: http://git.nguyen.vg/gitweb/?p=hacks%2FsimpleWebSlides.git;a=commitdiff_plain;h=6479635717a1a3c6569b70846532dbbc8f05edd2 Fix titles with & inside. --- diff --git a/simpleWebSlides.js b/simpleWebSlides.js index ce50c94..23f08a2 100644 --- a/simpleWebSlides.js +++ b/simpleWebSlides.js @@ -550,7 +550,12 @@ SWS.Presentation = new function () { var loop = function (doc, dir, add, ignoreFirst) { if (ignoreFirst !== true) { - var this_toc = { 'title' : doc.find("title").first().text(), + var this_toc = { 'title' : doc.find("title").first().text() + .replace ("&", "&") + .replace("'","'") + .replace('"', """) + .replace("<", "<") + .replace(">", ">"), 'sections' : build_sections(doc) }; add(toc, this_toc); };