1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 22:52:07 +00:00

LibWeb: Fix off-by-one error when highlighting unquoted HTML attributes

This fixes #11166
This commit is contained in:
Sam Atkins 2021-12-10 17:17:12 +00:00 committed by Andreas Kling
parent 2e4e0195de
commit 197759e30f

View file

@ -1237,7 +1237,7 @@ _StartOfFunction:
ON_WHITESPACE ON_WHITESPACE
{ {
m_current_token.last_attribute().value = consume_current_builder(); m_current_token.last_attribute().value = consume_current_builder();
m_current_token.last_attribute().value_end_position = nth_last_position(2); m_current_token.last_attribute().value_end_position = nth_last_position(1);
SWITCH_TO(BeforeAttributeName); SWITCH_TO(BeforeAttributeName);
} }
ON('&') ON('&')