summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorstelar7 <dudedbz@gmail.com>2022-05-08 00:25:31 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-08 16:29:06 +0200
commit469380d6bc08613214da93bcc5b536a971f33340 (patch)
tree5f5f30a98c07d9efe25b5f63ad45981a6086907a /Userland
parent2b3c07f4ad95db507cfb033e32ee1b962d4a4a61 (diff)
downloadserenity-469380d6bc08613214da93bcc5b536a971f33340.zip
LibWeb: Dont consider '-n-' a `dashndashdigit-ident` token
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index ab89e724cb..04f303b330 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -5249,6 +5249,8 @@ Optional<Selector::SimpleSelector::ANPlusBPattern> Parser::parse_a_n_plus_b_patt
auto ident = value.token().ident();
if (!ident.starts_with("-n-"sv, CaseSensitivity::CaseInsensitive))
return false;
+ if (ident.length() == 3)
+ return false;
for (size_t i = 3; i < ident.length(); ++i) {
if (!is_ascii_digit(ident[i]))
return false;