LibWeb: Fix tokenizing scripts with '<' in them

The EMIT_CHARACTER_AND_RECONSUME_IN was emitting the current token
instead of the specified codepoint.
This commit is contained in:
Andreas Kling 2020-06-02 14:26:23 +02:00
parent f3799b501e
commit a3936f10eb
Notes: sideshowbarker 2024-07-19 05:53:28 +09:00

View file

@ -84,12 +84,12 @@
return m_queued_tokens.dequeue(); \
} while (0)
#define EMIT_CHARACTER_AND_RECONSUME_IN(codepoint, new_state) \
do { \
m_queued_tokens.enqueue(m_current_token); \
will_reconsume_in(State::new_state); \
m_state = State::new_state; \
goto new_state; \
#define EMIT_CHARACTER_AND_RECONSUME_IN(codepoint, new_state) \
do { \
m_queued_tokens.enqueue(HTMLToken::make_character(codepoint)); \
will_reconsume_in(State::new_state); \
m_state = State::new_state; \
goto new_state; \
} while (0)
#define FLUSH_CODEPOINTS_CONSUMED_AS_A_CHARACTER_REFERENCE \