LibWeb: Avoid assertion failure on parsing numeric character references
This commit is contained in:
parent
5fe3cc3b85
commit
898b8ffcb6
Notes:
sideshowbarker
2024-07-19 17:22:07 +09:00
Author: https://github.com/lo-v-ol Commit: https://github.com/SerenityOS/serenity/commit/898b8ffcb69 Pull-request: https://github.com/SerenityOS/serenity/pull/9057
2 changed files with 6 additions and 6 deletions
|
@ -166,7 +166,7 @@ TEST_CASE(multiple_attributes)
|
|||
|
||||
TEST_CASE(character_reference_in_attribute)
|
||||
{
|
||||
auto tokens = run_tokenizer("<p foo=a&b bar='a&b' baz=\"a&b\">");
|
||||
auto tokens = run_tokenizer("<p foo=a&b bar='a&b' baz=\"a&b\">");
|
||||
BEGIN_ENUMERATION(tokens);
|
||||
EXPECT_START_TAG_TOKEN(p);
|
||||
EXPECT_TAG_TOKEN_ATTRIBUTE_COUNT(3);
|
||||
|
|
|
@ -1554,7 +1554,7 @@ _StartOfFunction:
|
|||
ON('#')
|
||||
{
|
||||
m_temporary_buffer.append(current_input_character.value());
|
||||
SWITCH_TO(NumericCharacterReference);
|
||||
SWITCH_TO_WITH_UNCLEAN_BUILDER(NumericCharacterReference);
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
|
@ -1630,12 +1630,12 @@ _StartOfFunction:
|
|||
ON('X')
|
||||
{
|
||||
m_temporary_buffer.append(current_input_character.value());
|
||||
SWITCH_TO(HexadecimalCharacterReferenceStart);
|
||||
SWITCH_TO_WITH_UNCLEAN_BUILDER(HexadecimalCharacterReferenceStart);
|
||||
}
|
||||
ON('x')
|
||||
{
|
||||
m_temporary_buffer.append(current_input_character.value());
|
||||
SWITCH_TO(HexadecimalCharacterReferenceStart);
|
||||
SWITCH_TO_WITH_UNCLEAN_BUILDER(HexadecimalCharacterReferenceStart);
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
|
@ -1696,7 +1696,7 @@ _StartOfFunction:
|
|||
}
|
||||
ON(';')
|
||||
{
|
||||
SWITCH_TO(NumericCharacterReferenceEnd);
|
||||
SWITCH_TO_WITH_UNCLEAN_BUILDER(NumericCharacterReferenceEnd);
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
|
@ -1716,7 +1716,7 @@ _StartOfFunction:
|
|||
}
|
||||
ON(';')
|
||||
{
|
||||
SWITCH_TO(NumericCharacterReferenceEnd);
|
||||
SWITCH_TO_WITH_UNCLEAN_BUILDER(NumericCharacterReferenceEnd);
|
||||
}
|
||||
ANYTHING_ELSE
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue