Fix the < and > symbols are doubly escaped which affected by executing preventXSS twice

This commit is contained in:
Wu Cheng-Han 2017-09-27 18:22:49 +08:00
parent f2743ff8f8
commit fe384d80bf

View file

@ -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(/&amp;lt;/g, '&lt;').replace(/&amp;gt;/g, '&gt;')
removeDOMEvents($('.slides'))
$('.slides').show()