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

Unified Diff: Source/core/html/forms/DateInputType.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/ColorInputType.cpp ('k') | Source/core/html/forms/EmailInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/DateInputType.cpp
diff --git a/Source/core/html/forms/DateInputType.cpp b/Source/core/html/forms/DateInputType.cpp
index fb687f3bd1abd9bc1ed7d80c0ef302dd50beab10..91732e395345cea320b08c548bb211d200e93874 100644
--- a/Source/core/html/forms/DateInputType.cpp
+++ b/Source/core/html/forms/DateInputType.cpp
@@ -38,6 +38,7 @@
#include "core/html/forms/DateTimeFieldsState.h"
#include "core/inspector/ConsoleMessage.h"
#include "platform/DateComponents.h"
+#include "platform/JSONValues.h"
#include "platform/text/PlatformLocale.h"
#include "wtf/PassOwnPtr.h"
@@ -94,7 +95,7 @@ void DateInputType::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, 'yyyy-MM-dd'.", value.utf8().data())));
+ String::format("The specified value %s does not conform to the required format, \"yyyy-MM-dd\".", JSONValue::quoteString(value).utf8().data())));
}
}
« no previous file with comments | « Source/core/html/forms/ColorInputType.cpp ('k') | Source/core/html/forms/EmailInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698