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

Unified Diff: Source/core/html/forms/TextFieldInputType.cpp

Issue 189843008: Value sanitization for input[type=text] should not truncate a value at control character (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bug196640
Patch Set: Created 6 years, 9 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 | « LayoutTests/fast/forms/input-value-sanitization-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/TextFieldInputType.cpp
diff --git a/Source/core/html/forms/TextFieldInputType.cpp b/Source/core/html/forms/TextFieldInputType.cpp
index 22b6e1385719922354961482252a0759f871c986..c16d0f4312b4e8460fc484dddb215ffeb09546e8 100644
--- a/Source/core/html/forms/TextFieldInputType.cpp
+++ b/Source/core/html/forms/TextFieldInputType.cpp
@@ -403,7 +403,7 @@ static String limitLength(const String& string, unsigned maxLength)
// compatible with IE and Firefox.
for (unsigned i = 0; i < newLength; ++i) {
const UChar current = string[i];
- if (current < ' ' && current != '\t') {
+ if (current < ' ' && current != '\t' && current != '\v') {
tkent 2014/03/07 17:26:34 Please follow the FIXME comment above.
Habib Virji 2014/03/10 12:02:56 Done.
newLength = i;
break;
}
« no previous file with comments | « LayoutTests/fast/forms/input-value-sanitization-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698