Index: Source/core/editing/MarkupAccumulator.cpp |
diff --git a/Source/core/editing/MarkupAccumulator.cpp b/Source/core/editing/MarkupAccumulator.cpp |
index 69b8673e7f2ab85335a56e88e9e1f906f9c55a74..ee12e50793c8ae2eeafab5f96e49e20ab5904795 100644 |
--- a/Source/core/editing/MarkupAccumulator.cpp |
+++ b/Source/core/editing/MarkupAccumulator.cpp |
@@ -125,9 +125,9 @@ String MarkupAccumulator::serializeNodes(Node& targetNode, EChildrenOnly childre |
void MarkupAccumulator::serializeNodesWithNamespaces(Node& targetNode, EChildrenOnly childrenOnly, const Namespaces* namespaces, Vector<QualifiedName>* tagNamesToSkip) |
{ |
- if (tagNamesToSkip) { |
+ if (tagNamesToSkip && targetNode.isElementNode()) { |
for (size_t i = 0; i < tagNamesToSkip->size(); ++i) { |
- if (targetNode.hasTagName(tagNamesToSkip->at(i))) |
+ if (toElement(targetNode).hasTagName(tagNamesToSkip->at(i))) |
return; |
} |
} |