bug(security): allow name and slot attributes when sanitizing (#18246)

* allow name attribute

* also add slot
This commit is contained in:
Liam DeBeasi
2019-05-14 11:28:31 -04:00
committed by GitHub
parent 394cf8d28f
commit ba0def3a38

View File

@ -122,5 +122,5 @@ const getElementChildren = (element: any) => {
return (element.children != null) ? element.children : element.childNodes; return (element.children != null) ? element.children : element.childNodes;
}; };
const allowedAttributes = ['class', 'id', 'href', 'src']; const allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed']; const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];