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

Unified Diff: Source/weborigin/KURL.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/web/WebPageSerializerImpl.cpp ('k') | Source/wtf/text/TextEncoding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/weborigin/KURL.cpp
diff --git a/Source/weborigin/KURL.cpp b/Source/weborigin/KURL.cpp
index 99b20a1b40965eb23fc6f5290d9ab8aacda6f070..9f330a139a3637745a0007c264edd9e9d6d6d07c 100644
--- a/Source/weborigin/KURL.cpp
+++ b/Source/weborigin/KURL.cpp
@@ -100,7 +100,7 @@ public:
virtual void ConvertFromUTF16(const url_parse::UTF16Char* input, int inputLength, url_canon::CanonOutput* output)
{
- CString encoded = m_encoding->encode(String(input, inputLength), WTF::URLEncodedEntitiesForUnencodables);
+ CString encoded = m_encoding->normalizeAndEncode(String(input, inputLength), WTF::URLEncodedEntitiesForUnencodables);
output->Append(encoded.data(), static_cast<int>(encoded.length()));
}
@@ -602,7 +602,7 @@ String decodeURLEscapeSequences(const String& string, const WTF::TextEncoding& e
String encodeWithURLEscapeSequences(const String& notEncodedString)
{
- CString utf8 = UTF8Encoding().encode(notEncodedString, WTF::URLEncodedEntitiesForUnencodables);
+ CString utf8 = UTF8Encoding().normalizeAndEncode(notEncodedString, WTF::URLEncodedEntitiesForUnencodables);
url_canon::RawCanonOutputT<char> buffer;
int inputLength = utf8.length();
« no previous file with comments | « Source/web/WebPageSerializerImpl.cpp ('k') | Source/wtf/text/TextEncoding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698