From c872d9f7ef97a77adf0778047d9a30fb15815346 Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Sun, 24 Jul 2011 08:23:38 -0700 Subject: [PATCH] Insert CDATA around inline js/css in HTML, slidy. --- src/Text/Pandoc/Writers/HTML.hs | 3 ++- templates | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 4c82f2c85..fe6ee5db4 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -142,7 +142,8 @@ pandocToHtml opts (Pandoc (Meta title' authors' date') blocks) = do _ -> case lookup "mathml-script" (writerVariables opts) of Just s -> script ! [thetype "text/javascript"] << - primHtml s + primHtml ("/*<![CDATA[*/\n" ++ s ++ + "/*]]>*/\n") Nothing -> noHtml else noHtml let newvars = [("highlighting-css", defaultHighlightingCss) | diff --git a/templates b/templates index 8cb5fef74..8cd8b1959 160000 --- a/templates +++ b/templates @@ -1 +1 @@ -Subproject commit 8cb5fef740725ee51ffed5022faa097f21336bcd +Subproject commit 8cd8b19598fa898498a7883d081f51615aa5fc12