mirror of https://github.com/status-im/codimd.git
fix: properly escape reveal markdown script tag with case-insensitive regex [Security Issue]
Signed-off-by: Max Wu <jackymaxj@gmail.com>
This commit is contained in:
parent
dd16949222
commit
9291a7670a
|
@ -103,7 +103,7 @@ import { md } from './extra'
|
||||||
|
|
||||||
// prevent script end tags in the content from interfering
|
// prevent script end tags in the content from interfering
|
||||||
// with parsing
|
// with parsing
|
||||||
content = content.replace(/<\/script>/g, SCRIPT_END_PLACEHOLDER)
|
content = content.replace(/<\/script>/gi, SCRIPT_END_PLACEHOLDER)
|
||||||
|
|
||||||
return '<script type="text/template">' + content + '</script>'
|
return '<script type="text/template">' + content + '</script>'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue