mirror of https://github.com/status-im/codimd.git
Merge pull request #1650 from hackmdio/bugfix/fix-reveal-markdown-stored-xss
Fix slide mode stored XSS
This commit is contained in:
commit
452f9ac124
|
@ -103,7 +103,7 @@ import { md } from './extra'
|
|||
|
||||
// prevent script end tags in the content from interfering
|
||||
// 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>'
|
||||
}
|
||||
|
|
|
@ -80,6 +80,8 @@ const defaultOptions = {
|
|||
}
|
||||
|
||||
var options = meta.slideOptions || {}
|
||||
// delete dependencies to avoid import user defined external resources
|
||||
delete options.dependencies
|
||||
|
||||
if (Object.hasOwnProperty.call(options, 'spotlight')) {
|
||||
defaultOptions.dependencies.push({
|
||||
|
|
Loading…
Reference in New Issue