diff options
author | Sheogorath | 2018-11-10 20:24:41 +0100 |
---|---|---|
committer | Sheogorath | 2018-11-10 20:27:07 +0100 |
commit | c59b94a37b9d44f6c56b12f61cbfb80ff5f0db50 (patch) | |
tree | f9ffb51a7a23a45ac83c7babaf2035f239b0b320 /public/js/reveal-markdown.js | |
parent | 4e5e7df4f8ed5b4317ab9205ceb8c2b3231517ad (diff) |
Remove the xss library from webpack
We can load the xss functions directly from the library instead of
loading them through the expose loader of webpack, this should simplify
the setup and maybe even improve speed a bit.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to '')
-rw-r--r-- | public/js/reveal-markdown.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/reveal-markdown.js b/public/js/reveal-markdown.js index d15b5ebd..ad5bfd04 100644 --- a/public/js/reveal-markdown.js +++ b/public/js/reveal-markdown.js @@ -1,6 +1,6 @@ /* eslint-env browser, jquery */ -import { preventXSS } from './render' +import { preventXSS, escapeAttrValue } from './render' import { md } from './extra' /** @@ -259,7 +259,7 @@ import { md } from './extra' while ((matchesClass = mardownClassRegex.exec(classes))) { var name = matchesClass[1] var value = matchesClass[2] - if (name.substr(0, 5) === 'data-' || window.whiteListAttr.indexOf(name) !== -1) { elementTarget.setAttribute(name, window.filterXSS.escapeAttrValue(value)) } + if (name.substr(0, 5) === 'data-' || window.whiteListAttr.indexOf(name) !== -1) { elementTarget.setAttribute(name, escapeAttrValue(value)) } } return true } |