mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Remove catch-all case for input sanitization
Replaced catch-all with explicit case for inputs that do not have a value sanitization algorithm. This should prevent us from forgetting to implement a sanitization for an input, since they must all be accounted for in the match expression.
This commit is contained in:
parent
f65cb94b9e
commit
23359c5868
1 changed files with 10 additions and 1 deletions
|
@ -1213,7 +1213,16 @@ impl HTMLInputElement {
|
||||||
value.push_str(sanitized.as_str());
|
value.push_str(sanitized.as_str());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => (),
|
// The following inputs don't have a value sanitization algorithm.
|
||||||
|
// See https://html.spec.whatwg.org/multipage/#value-sanitization-algorithm
|
||||||
|
InputType::Button |
|
||||||
|
InputType::Checkbox |
|
||||||
|
InputType::File |
|
||||||
|
InputType::Hidden |
|
||||||
|
InputType::Image |
|
||||||
|
InputType::Radio |
|
||||||
|
InputType::Reset |
|
||||||
|
InputType::Submit => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue