mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb: Replace incorrect uses of String::trim_whitespace()
This commit is contained in:
parent
fb21271334
commit
b9220a18d1
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/linusg
Commit: b9220a18d1
Pull-request: https://github.com/SerenityOS/serenity/pull/15423
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 10 additions and 5 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/HTML/HTMLFormElement.h>
|
||||
#include <LibWeb/HTML/HTMLInputElement.h>
|
||||
#include <LibWeb/Infra/CharacterTypes.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Layout/ButtonBox.h>
|
||||
#include <LibWeb/Layout/CheckBox.h>
|
||||
|
@ -300,7 +301,7 @@ String HTMLInputElement::value_sanitization_algorithm(String value) const
|
|||
if (!(c == '\r' || c == '\n'))
|
||||
builder.append(c);
|
||||
}
|
||||
return builder.to_string().trim_whitespace();
|
||||
return builder.string_view().trim(Infra::ASCII_WHITESPACE);
|
||||
}
|
||||
} else if (type_state() == HTMLInputElement::TypeAttributeState::Number) {
|
||||
// If the value of the element is not a valid floating-point number, then set it to the empty string instead.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue