diff options
Diffstat (limited to 'src/HTML5/Serializer/OutputRules.php')
-rw-r--r-- | src/HTML5/Serializer/OutputRules.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php index c45045f..d4d6bb1 100644 --- a/src/HTML5/Serializer/OutputRules.php +++ b/src/HTML5/Serializer/OutputRules.php @@ -221,7 +221,9 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface $this->openTag($ele); if (Elements::isA($name, Elements::TEXT_RAW)) { foreach ($ele->childNodes as $child) { - $this->wr($child->data); + if ($child instanceof \DOMCharacterData) { + $this->wr($child->data); + } } } else { // Handle children. |