Skip to content

Commit 9291a76

Browse files
committed
fix: properly escape reveal markdown script tag with case-insensitive regex [Security Issue]
Signed-off-by: Max Wu <jackymaxj@gmail.com>
1 parent dd16949 commit 9291a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/js/reveal-markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ import { md } from './extra'
103103

104104
// prevent script end tags in the content from interfering
105105
// with parsing
106-
content = content.replace(/<\/script>/g, SCRIPT_END_PLACEHOLDER)
106+
content = content.replace(/<\/script>/gi, SCRIPT_END_PLACEHOLDER)
107107

108108
return '<script type="text/template">' + content + '</script>'
109109
}

0 commit comments

Comments
 (0)