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

Unified Diff: Source/platform/JSONValues.cpp

Issue 1167793003: Escape all of invalid values in console messages for INPUT elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/platform/JSONValues.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/JSONValues.cpp
diff --git a/Source/platform/JSONValues.cpp b/Source/platform/JSONValues.cpp
index a0e4e733778b57767e9cea0312bc4b19490548fa..a318733a3235263f5dceb818af2b7e45f7f81eed 100644
--- a/Source/platform/JSONValues.cpp
+++ b/Source/platform/JSONValues.cpp
@@ -88,6 +88,13 @@ void writeIndent(int depth, StringBuilder* output)
} // anonymous namespace
+String JSONValue::quoteString(const String& input)
+{
+ StringBuilder builder;
+ doubleQuoteString(input, &builder);
+ return builder.toString();
+}
+
bool JSONValue::asBoolean(bool*) const
{
return false;
« no previous file with comments | « Source/platform/JSONValues.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698