mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb: Implement input month type sanitation algorithm
This commit is contained in:
parent
edb3a0aa0a
commit
8197b7a063
Notes:
sideshowbarker
2024-07-17 22:01:16 +09:00
Author: https://github.com/lanmonster
Commit: 8197b7a063
Pull-request: https://github.com/SerenityOS/serenity/pull/16320
Reviewed-by: https://github.com/linusg ✅
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue