mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Fix hex character references accepting all alphabetic ASCII
Instead of just A-F/a-f, any char A-Z/a-z was being accepted as a valid hexadecimal digit.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
df87a9689c
commit
1ba15e1fa3
@@ -1819,16 +1819,11 @@ _StartOfFunction:
|
||||
m_character_reference_code += current_input_character.value() - 0x30;
|
||||
continue;
|
||||
}
|
||||
ON_ASCII_UPPER_ALPHA
|
||||
ON_ASCII_HEX_DIGIT
|
||||
{
|
||||
m_character_reference_code *= 16;
|
||||
m_character_reference_code += current_input_character.value() - 0x37;
|
||||
continue;
|
||||
}
|
||||
ON_ASCII_LOWER_ALPHA
|
||||
{
|
||||
m_character_reference_code *= 16;
|
||||
m_character_reference_code += current_input_character.value() - 0x57;
|
||||
auto hex_digit_min_ascii_value = is_ascii_upper_alpha(current_input_character.value()) ? 0x37 : 0x57;
|
||||
m_character_reference_code += current_input_character.value() - hex_digit_min_ascii_value;
|
||||
continue;
|
||||
}
|
||||
ON(';')
|
||||
|
||||
Reference in New Issue
Block a user