mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-29 07:48:47 +00: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:
parent
23b25333a5
commit
683c08744a
Notes:
sideshowbarker
2024-07-17 03:59:29 +09:00
Author: https://github.com/trflynn89
Commit: 683c08744a
Pull-request: https://github.com/SerenityOS/serenity/pull/23830
Reviewed-by: https://github.com/shannonbooth ✅
17 changed files with 48 additions and 26 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue