Userland: Avoid some conversions from rvalue strings to StringView

These are all actually fine, there is no UAF here. But once e.g.
`ByteString::view() &&` is deleted, these instances won't compile.
This commit is contained in:
Timothy Flynn 2024-04-03 21:51:34 -04:00 committed by Andreas Kling
parent 23b25333a5
commit 683c08744a
Notes: sideshowbarker 2024-07-17 03:59:29 +09:00
17 changed files with 48 additions and 26 deletions

View file

@ -189,7 +189,9 @@ FileFilter HTMLInputElement::parse_accept_attribute() const
// If specified, the attribute must consist of a set of comma-separated tokens, each of which must be an ASCII
// case-insensitive match for one of the following:
get_attribute_value(HTML::AttributeNames::accept).bytes_as_string_view().for_each_split_view(',', SplitBehavior::Nothing, [&](StringView value) {
auto accept = get_attribute_value(HTML::AttributeNames::accept);
accept.bytes_as_string_view().for_each_split_view(',', SplitBehavior::Nothing, [&](StringView value) {
// The string "audio/*"
// Indicates that sound files are accepted.
if (value.equals_ignoring_ascii_case("audio/*"sv))