Index: Source/core/editing/MarkupAccumulator.cpp |
diff --git a/Source/core/editing/MarkupAccumulator.cpp b/Source/core/editing/MarkupAccumulator.cpp |
index 1ccbc83f7694b02468b203c8a766b579e1184058..4411ed8104cea3c54559c7848f3eacbff712a1a8 100644 |
--- a/Source/core/editing/MarkupAccumulator.cpp |
+++ b/Source/core/editing/MarkupAccumulator.cpp |
@@ -303,14 +303,16 @@ void MarkupAccumulator::appendNamespace(StringBuilder& result, const AtomicStrin |
EntityMask MarkupAccumulator::entityMaskForText(Text* text) const |
{ |
+ if (!text->document().isHTMLDocument()) |
+ return EntityMaskInPCDATA; |
+ |
const QualifiedName* parentName = 0; |
if (text->parentElement()) |
parentName = &(text->parentElement())->tagQName(); |
if (parentName && (*parentName == scriptTag || *parentName == styleTag || *parentName == xmpTag)) |
return EntityMaskInCDATA; |
- |
- return text->document().isHTMLDocument() ? EntityMaskInHTMLPCDATA : EntityMaskInPCDATA; |
+ return EntityMaskInHTMLPCDATA; |
} |
void MarkupAccumulator::appendText(StringBuilder& result, Text* text) |