|
|
@@ -697,7 +697,7 @@ class Sanitize implements RegistryAware
|
|
|
$parent = $element->parentNode;
|
|
|
if (!in_array($tag, ['html', 'head', 'body', 'div'], true)
|
|
|
&& !isset($this->allowed_html_elements_with_attributes[$tag])) {
|
|
|
- if (!in_array($tag, ['script', 'style', 'svg', 'math'], true)) {
|
|
|
+ if (!in_array($tag, ['script', 'style', 'svg', 'math', 'template'], true)) {
|
|
|
// Preserve children inside the disallowed element
|
|
|
for ($i = $element->childNodes->length - 1; $i >= 0; $i--) {
|
|
|
$child = $element->childNodes->item($i);
|