From 98f98483ef751242e124d6240410dca8c66a456c Mon Sep 17 00:00:00 2001 From: Jessica Lawshe Date: Tue, 28 Aug 2018 15:04:40 -0500 Subject: [PATCH] Add default sanitize options --- services/web/config/settings.defaults.coffee | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/services/web/config/settings.defaults.coffee b/services/web/config/settings.defaults.coffee index 59d6e0aa89..6572b01875 100644 --- a/services/web/config/settings.defaults.coffee +++ b/services/web/config/settings.defaults.coffee @@ -484,4 +484,24 @@ module.exports = settings = # {imageName: 'texlive-full:2016.1', imageDesc: 'Legacy SL TeXLive 2016'} # {imageName: 'texlive-full:2015.1', imageDesc: 'Legacy SL TeXLive 2015'} # {imageName: 'texlive-full:2014.2', imageDesc: 'Legacy SL TeXLive 2014.2'} - # ] \ No newline at end of file + # ] + + # module options + # ---------- + modules: + sanitize: + options: + allowedTags: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', 'nl', 'li', 'b', 'i', 'strong', 'em', 'strike', 'code', 'hr', 'br', 'div', 'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'iframe', 'img', 'figure', 'figcaption' ] + allowedAttributes: + 'a': [ 'href', 'name', 'target', 'class' ] + 'div': [ 'class', 'id', 'style' ] + 'h1': [ 'class', 'id' ] + 'h2': [ 'class', 'id' ] + 'h3': [ 'class', 'id' ] + 'h4': [ 'class', 'id' ] + 'h5': [ 'class', 'id' ] + 'h6': [ 'class', 'id' ] + 'figure': [ 'class', 'id', 'style'] + 'figcaption': [ 'class', 'id', 'style'] + 'iframe': [ 'allowfullscreen', 'frameborder', 'height', 'src', 'width' ] + 'img': [ 'alt', 'class', 'src', 'style' ] \ No newline at end of file