diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-02 14:26:23 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-02 14:27:53 +0200 |
commit | a3936f10eb59971203a9b478a439a409144d44ff (patch) | |
tree | e34c35237d7c44b9630f7565b6b783c687b49ec6 /Libraries | |
parent | f3799b501eba3b4f73ff6c7e3a2c0e0f0104d420 (diff) | |
download | serenity-a3936f10eb59971203a9b478a439a409144d44ff.zip |
LibWeb: Fix tokenizing scripts with '<' in them
The EMIT_CHARACTER_AND_RECONSUME_IN was emitting the current token
instead of the specified codepoint.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibWeb/Parser/HTMLTokenizer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp index 88efaae5f6..a8c7cf1e86 100644 --- a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp +++ b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp @@ -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 \ |