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); |
} |