Skip to content

Commit fe384d8

Browse files
committed
Fix the < and > symbols are doubly escaped which affected by executing preventXSS twice
1 parent f2743ff commit fe384d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

public/js/slide.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ const slideOptions = {
5555
const slides = RevealMarkdown.slidify(body, slideOptions)
5656
$('.slides').html(slides)
5757
RevealMarkdown.initialize()
58+
// fix < and > were doubly escaped
59+
$('.slides')[0].innerHTML = $('.slides')[0].innerHTML.replace(/&amp;lt;/g, '&lt;').replace(/&amp;gt;/g, '&gt;')
5860
removeDOMEvents($('.slides'))
5961
$('.slides').show()
6062

0 commit comments

Comments
 (0)