mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
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:
committed by
Andreas Kling
parent
23b25333a5
commit
683c08744a
Notes:
sideshowbarker
2024-07-17 03:59:29 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/683c08744a Pull-request: https://github.com/SerenityOS/serenity/pull/23830 Reviewed-by: https://github.com/shannonbooth ✅
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user