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

Unified Diff: Source/core/html/forms/TimeInputType.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/core/html/forms/EmailInputType.cpp ('k') | Source/platform/JSONValues.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/TimeInputType.cpp
diff --git a/Source/core/html/forms/TimeInputType.cpp b/Source/core/html/forms/TimeInputType.cpp
index 68143304ada7f774656d0ab825b01e8697af52ce..0ec641c072c5576d518f2f43640d8cf196470c26 100644
--- a/Source/core/html/forms/TimeInputType.cpp
+++ b/Source/core/html/forms/TimeInputType.cpp
@@ -106,7 +106,7 @@ void TimeInputType::warnIfValueIsInvalid(const String& value) const
{
if (value != element().sanitizeValue(value)) {
element().document().addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, WarningMessageLevel,
- String::format("The specified value '%s' does not conform to the required format. The format is 'HH:mm', 'HH:mm:ss' or 'HH:mm:ss.SSS' where HH is 00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.", value.utf8().data())));
+ String::format("The specified value %s does not conform to the required format. The format is \"HH:mm\", \"HH:mm:ss\" or \"HH:mm:ss.SSS\" where HH is 00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.", JSONValue::quoteString(value).utf8().data())));
}
}
« no previous file with comments | « Source/core/html/forms/EmailInputType.cpp ('k') | Source/platform/JSONValues.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698