Allow <video> and <source> in sanitized HTML

This commit is contained in:
Jessica Lawshe 2018-09-14 10:24:06 -05:00
parent b14fe82c1c
commit bcd465a35d

View file

@ -491,7 +491,7 @@ module.exports = settings =
modules: modules:
sanitize: sanitize:
options: 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' ] 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', 'source', 'video' ]
allowedAttributes: allowedAttributes:
'a': [ 'href', 'name', 'target', 'class' ] 'a': [ 'href', 'name', 'target', 'class' ]
'div': [ 'class', 'id', 'style' ] 'div': [ 'class', 'id', 'style' ]
@ -505,3 +505,5 @@ module.exports = settings =
'figcaption': [ 'class', 'id', 'style'] 'figcaption': [ 'class', 'id', 'style']
'iframe': [ 'allowfullscreen', 'frameborder', 'height', 'src', 'width' ] 'iframe': [ 'allowfullscreen', 'frameborder', 'height', 'src', 'width' ]
'img': [ 'alt', 'class', 'src', 'style' ] 'img': [ 'alt', 'class', 'src', 'style' ]
'source': [ 'src', 'type' ]
'video': [ 'alt', 'class', 'controls', 'height', 'width' ]