#565: M1358297 parts 3 and 4

This commit is contained in:
Cameron Kaiser
2019-08-17 10:42:19 -07:00
parent 9ab5bb0ed4
commit 3fd15a87ad
12 changed files with 141 additions and 25 deletions

View File

@@ -4773,15 +4773,13 @@ HTMLInputElement::SanitizeValue(nsAString& aValue)
case NS_FORM_INPUT_TEL:
case NS_FORM_INPUT_PASSWORD:
{
char16_t crlf[] = { char16_t('\r'), char16_t('\n'), 0 };
aValue.StripChars(crlf);
aValue.StripCRLF();
}
break;
case NS_FORM_INPUT_EMAIL:
case NS_FORM_INPUT_URL:
{
char16_t crlf[] = { char16_t('\r'), char16_t('\n'), 0 };
aValue.StripChars(crlf);
aValue.StripCRLF();
aValue = nsContentUtils::TrimWhitespace<nsContentUtils::IsHTMLWhitespace>(aValue);
}