mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibWeb: Use is_ascii_case_insensitive_match() where the spec says to
This commit is contained in:
parent
f0b72b819e
commit
2026ea557e
Notes:
sideshowbarker
2024-07-17 00:04:12 +09:00
Author: https://github.com/AtkinsSJ
Commit: 2026ea557e
Pull-request: https://github.com/SerenityOS/serenity/pull/17502
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/trflynn89
10 changed files with 59 additions and 44 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLHyperlinkElementUtils.h>
|
||||
#include <LibWeb/Infra/CharacterTypes.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/Loader/FrameLoader.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
@ -569,7 +570,7 @@ bool HTMLHyperlinkElementUtils::get_an_elements_noopener(StringView target) cons
|
|||
|
||||
// 2. If element's link types do not include the opener keyword and
|
||||
// target is an ASCII case-insensitive match for "_blank", then return true.
|
||||
if (!link_types.contains_slow("opener"sv) && target.equals_ignoring_case("_blank"sv))
|
||||
if (!link_types.contains_slow("opener"sv) && Infra::is_ascii_case_insensitive_match(target, "_blank"sv))
|
||||
return true;
|
||||
|
||||
// 3. Return false.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue