diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index 34f64cb4e..865f2a107 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -4955,6 +4955,7 @@ class e_parse
continue;
}
+ $removeAttributes = array();
foreach($node->attributes as $attr)
{
$name = $attr->nodeName;
@@ -4962,8 +4963,6 @@ class e_parse
$allow = isset($this->allowedAttributes[$tag]) ? $this->allowedAttributes[$tag] : $this->allowedAttributes['default'];
- $removeAttributes = array();
-
if(!in_array($name, $allow))
{
diff --git a/e107_tests/tests/unit/e_parseTest.php b/e107_tests/tests/unit/e_parseTest.php
index d53d47d8b..741456990 100644
--- a/e107_tests/tests/unit/e_parseTest.php
+++ b/e107_tests/tests/unit/e_parseTest.php
@@ -2635,7 +2635,13 @@ Your browser does not support the audio tag.
14 => array(
'html' => '', // test removal of 'script' tags
'expected' => ''
- )
+ ),
+
+ 15 => array(
+ 'html' => '',
+ 'expected' => ''
+
+ ),
);