Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: Source/core/editing/MarkupAccumulator.cpp

Issue 26193002: XMLSerializer escapes < > & correctly inside <script> and <style> tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tentative fix for the bug, and fix for a failing test. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/MarkupAccumulator.cpp
diff --git a/Source/core/editing/MarkupAccumulator.cpp b/Source/core/editing/MarkupAccumulator.cpp
index 1ccbc83f7694b02468b203c8a766b579e1184058..51a8d0a620a8faf8b296af871b543ce173053161 100644
--- a/Source/core/editing/MarkupAccumulator.cpp
+++ b/Source/core/editing/MarkupAccumulator.cpp
@@ -308,7 +308,7 @@ EntityMask MarkupAccumulator::entityMaskForText(Text* text) const
parentName = &(text->parentElement())->tagQName();
if (parentName && (*parentName == scriptTag || *parentName == styleTag || *parentName == xmpTag))
- return EntityMaskInCDATA;
+ return text->document().isHTMLDocument() ? EntityMaskInCDATA : EntityMaskInPCDATA;
return text->document().isHTMLDocument() ? EntityMaskInHTMLPCDATA : EntityMaskInPCDATA;
jochen (gone - plz use gerrit) 2013/11/06 16:17:49 can you simplilfy this method a bit? if (!text->d
pwnall-personal 2013/11/06 17:34:30 Done. Did you mean I should use a ? : in a return
}

Powered by Google App Engine
This is Rietveld 408576698