diff options
author | Kyle Lanmon <kyle.lanmon@gmail.com> | 2022-12-04 00:20:36 -0600 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-15 09:43:41 +0000 |
commit | 8197b7a06332d9513cab5efbbc31a459f546adf3 (patch) | |
tree | 7f1b0322063ba017e10c87bd0d7ae02e43f1f36f /Userland/Libraries | |
parent | edb3a0aa0ac485ed7324f93d5e40b5be9e0ef43e (diff) | |
download | serenity-8197b7a06332d9513cab5efbbc31a459f546adf3.zip |
LibWeb: Implement input month type sanitation algorithm
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp index 70e26329bc..09e2147624 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -589,6 +589,10 @@ DeprecatedString HTMLInputElement::value_sanitization_algorithm(DeprecatedString // https://html.spec.whatwg.org/multipage/input.html#date-state-(type=date):value-sanitization-algorithm if (!is_valid_date_string(value)) return ""; + } else if (type_state() == HTMLInputElement::TypeAttributeState::Month) { + // https://html.spec.whatwg.org/multipage/input.html#month-state-(type=month):value-sanitization-algorithm + if (!is_valid_month_string(value)) + return ""; } else if (type_state() == HTMLInputElement::TypeAttributeState::Color) { // https://html.spec.whatwg.org/multipage/input.html#color-state-(type=color):value-sanitization-algorithm // If the value of the element is a valid simple color, then set it to the value of the element converted to ASCII lowercase; |