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

Unified Diff: Source/core/page/PageSerializer.cpp

Issue 19845004: Do not normalize into NFC the values of form fields (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add normalizeAndEncode() without memory safety problem Created 7 years, 5 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
« no previous file with comments | « Source/core/fileapi/BlobBuilder.cpp ('k') | Source/core/platform/network/FormDataBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageSerializer.cpp
diff --git a/Source/core/page/PageSerializer.cpp b/Source/core/page/PageSerializer.cpp
index 407a1b5947f655e481162beb2453c5f6fec32ae4..a1d0cf0ead3d1f3ed29bf02d552d1ddf9465a699 100644
--- a/Source/core/page/PageSerializer.cpp
+++ b/Source/core/page/PageSerializer.cpp
@@ -204,7 +204,7 @@ void PageSerializer::serializeFrame(Frame* frame)
return;
}
String text = accumulator.serializeNodes(document->documentElement(), IncludeNode);
- CString frameHTML = textEncoding.encode(text, WTF::EntitiesForUnencodables);
+ CString frameHTML = textEncoding.normalizeAndEncode(text, WTF::EntitiesForUnencodables);
m_resources->append(SerializedResource(url, document->suggestedMIMEType(), SharedBuffer::create(frameHTML.data(), frameHTML.length())));
m_resourceURLs.add(url);
@@ -272,7 +272,7 @@ void PageSerializer::serializeCSSStyleSheet(CSSStyleSheet* styleSheet, const KUR
WTF::TextEncoding textEncoding(styleSheet->contents()->charset());
ASSERT(textEncoding.isValid());
String textString = cssText.toString();
- CString text = textEncoding.encode(textString, WTF::EntitiesForUnencodables);
+ CString text = textEncoding.normalizeAndEncode(textString, WTF::EntitiesForUnencodables);
m_resources->append(SerializedResource(url, String("text/css"), SharedBuffer::create(text.data(), text.length())));
m_resourceURLs.add(url);
}
« no previous file with comments | « Source/core/fileapi/BlobBuilder.cpp ('k') | Source/core/platform/network/FormDataBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698