From fe384d80bf03a4d33fd38500cbaaf2ec3abb8bdb Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Wed, 27 Sep 2017 18:22:49 +0800 Subject: Fix the < and > symbols are doubly escaped which affected by executing preventXSS twice --- public/js/slide.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'public') diff --git a/public/js/slide.js b/public/js/slide.js index 59a352ec..b88ac022 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -55,6 +55,8 @@ const slideOptions = { const slides = RevealMarkdown.slidify(body, slideOptions) $('.slides').html(slides) RevealMarkdown.initialize() +// fix < and > were doubly escaped +$('.slides')[0].innerHTML = $('.slides')[0].innerHTML.replace(/&lt;/g, '<').replace(/&gt;/g, '>') removeDOMEvents($('.slides')) $('.slides').show() -- cgit v1.2.3