| Index: Source/core/html/forms/EmailInputType.cpp
|
| diff --git a/Source/core/html/forms/EmailInputType.cpp b/Source/core/html/forms/EmailInputType.cpp
|
| index 5fe92ff24d5072b1a408d06ed0d6fbf3a00fc31e..db450d9faf26a52556de64578293530ae7e27971 100644
|
| --- a/Source/core/html/forms/EmailInputType.cpp
|
| +++ b/Source/core/html/forms/EmailInputType.cpp
|
| @@ -30,6 +30,7 @@
|
| #include "core/html/parser/HTMLParserIdioms.h"
|
| #include "core/inspector/ConsoleMessage.h"
|
| #include "core/page/ChromeClient.h"
|
| +#include "platform/JSONValues.h"
|
| #include "platform/text/PlatformLocale.h"
|
| #include "public/platform/Platform.h"
|
| #include "wtf/PassOwnPtr.h"
|
| @@ -237,27 +238,13 @@ String EmailInputType::typeMismatchText() const
|
| return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmail);
|
| }
|
|
|
| -static String escapeNonASCII(const String& source)
|
| -{
|
| - StringBuilder builder;
|
| - builder.reserveCapacity(source.length());
|
| - for (unsigned i = 0; i < source.length(); ++i) {
|
| - if (isASCIIPrintable(source[i])) {
|
| - builder.append(source[i]);
|
| - continue;
|
| - }
|
| - builder.append(String::format("\\u%04x", source[i]));
|
| - }
|
| - return builder.toString();
|
| -}
|
| -
|
| void EmailInputType::warnIfValueIsInvalid(const String& value) const
|
| {
|
| String invalidAddress = findInvalidAddress(value);
|
| if (invalidAddress.isNull())
|
| return;
|
| element().document().addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, WarningMessageLevel,
|
| - String::format("The specified value '%s' is not a valid email address.", escapeNonASCII(invalidAddress).utf8().data())));
|
| + String::format("The specified value %s is not a valid email address.", JSONValue::quoteString(invalidAddress).utf8().data())));
|
| }
|
|
|
| bool EmailInputType::supportsSelectionAPI() const
|
|
|