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

Unified Diff: Source/wtf/text/TextEncodingRegistry.cpp

Issue 261013007: Prevent direct use of "replacement" text encoding. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: MSVC fix Created 6 years, 7 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/wtf/text/TextEncodingRegistry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/TextEncodingRegistry.cpp
diff --git a/Source/wtf/text/TextEncodingRegistry.cpp b/Source/wtf/text/TextEncodingRegistry.cpp
index 4bbf81b1e99f9a9f7a7b9c673ff7c1e08868d5c8..7c4bd4bce80c9c6c48a9b98f13cd330f7051882c 100644
--- a/Source/wtf/text/TextEncodingRegistry.cpp
+++ b/Source/wtf/text/TextEncodingRegistry.cpp
@@ -269,6 +269,16 @@ bool isJapaneseEncoding(const char* canonicalEncodingName)
return canonicalEncodingName && japaneseEncodings && japaneseEncodings->contains(canonicalEncodingName);
}
+bool isReplacementEncoding(const char* alias)
+{
+ return alias && !strcasecmp(alias, "replacement");
+}
+
+bool isReplacementEncoding(const String& alias)
+{
+ return alias == "replacement";
+}
+
bool shouldShowBackslashAsCurrencySymbolIn(const char* canonicalEncodingName)
{
return canonicalEncodingName && nonBackslashEncodings && nonBackslashEncodings->contains(canonicalEncodingName);
« no previous file with comments | « Source/wtf/text/TextEncodingRegistry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698