LibWeb: Treat dates and times with repeated separators as invalid

These would previously be treated as valid by the value sanitization
algorithm.
This commit is contained in:
Tim Ledbetter 2024-09-10 16:53:05 +01:00 committed by Tim Flynn
commit f9282f65d3
Notes: github-actions[bot] 2024-09-10 20:17:57 +00:00
3 changed files with 19 additions and 9 deletions

View file

@ -10,12 +10,17 @@ Changing type from "text" to "number" changes value from "123.45" to "123.45"
Changing type from "text" to "number" changes value from "not-a-number" to ""
Changing type from "text" to "date" changes value from "not-a-date" to ""
Changing type from "text" to "date" changes value from "2024-09-10" to "2024-09-10"
Changing type from "text" to "date" changes value from "2024--09--10" to ""
Changing type from "text" to "datetime-local" changes value from "not-a-local-datetime" to ""
Changing type from "text" to "datetime-local" changes value from "2024-09-10 23:59" to "2024-09-10T23:59"
Changing type from "text" to "datetime-local" changes value from "2024-09-10T23:59" to "2024-09-10T23:59"
Changing type from "text" to "datetime-local" changes value from "2024--09--10TT23::59" to ""
Changing type from "text" to "month" changes value from "not-a-month" to ""
Changing type from "text" to "month" changes value from "2024-09" to "2024-09"
Changing type from "text" to "month" changes value from "2024--09" to ""
Changing type from "text" to "week" changes value from "not-a-week" to ""
Changing type from "text" to "week" changes value from "2024-W26" to "2024-W26"
Changing type from "text" to "week" changes value from "2024--W26" to ""
Changing type from "text" to "time" changes value from "not-a-time" to ""
Changing type from "text" to "time" changes value from "23:59:59" to "23:59:59"
Changing type from "text" to "time" changes value from "23::59::59" to ""