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

Unified Diff: Source/wtf/text/TextEncoding.h

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/weborigin/KURL.cpp ('k') | Source/wtf/text/TextEncoding.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/TextEncoding.h
diff --git a/Source/wtf/text/TextEncoding.h b/Source/wtf/text/TextEncoding.h
index ed77021a59529f148472a28ffdba977852efd6e1..a3a7d88b0f7d88519bab91dd07f977acc00d1159 100644
--- a/Source/wtf/text/TextEncoding.h
+++ b/Source/wtf/text/TextEncoding.h
@@ -73,8 +73,13 @@ public:
return decode(str, length, false, ignored);
}
String decode(const char*, size_t length, bool stopOnError, bool& sawError) const;
+
+ // Encodes the string, but does *not* normalize first.
CString encode(const String&, UnencodableHandling) const;
+ // Applies Unicode NFC normalization, then encodes the normalized string.
+ CString normalizeAndEncode(const String&, UnencodableHandling) const;
+
UChar backslashAsCurrencySymbol() const;
private:
« no previous file with comments | « Source/weborigin/KURL.cpp ('k') | Source/wtf/text/TextEncoding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698