fix panic on negative counter value update

This commit is contained in:
yggverse 2025-01-19 15:30:06 +02:00
parent 7014df051c
commit 3eca182ddf
4 changed files with 6 additions and 5 deletions

View file

@ -55,9 +55,10 @@ impl Response {
control.update(
form.widget.text().is_empty(),
size_limit.map(|limit| {
limit
- (base.to_string_partial(UriHideFlags::QUERY).len()
limit as isize
- ((base.to_string_partial(UriHideFlags::QUERY).len()
+ Uri::escape_string(&form.widget.text(), None, false).len())
as isize)
}),
)
}