mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Replace incorrect uses of String::trim_whitespace()
This commit is contained in:
committed by
Andreas Kling
parent
fb21271334
commit
b9220a18d1
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/b9220a18d1 Pull-request: https://github.com/SerenityOS/serenity/pull/15423 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user