mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb: Add handling for 'an end tag whose tag name is sarcasm'
This commit is contained in:
parent
397579096f
commit
e602578501
Notes:
github-actions[bot]
2024-11-27 10:43:56 +00:00
Author: https://github.com/Psychpsyo
Commit: e602578501
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2604
Reviewed-by: https://github.com/trflynn89
1 changed files with 7 additions and 1 deletions
|
@ -2292,7 +2292,7 @@ void HTMLParser::handle_in_body(HTMLToken& token)
|
|||
return;
|
||||
}
|
||||
|
||||
// 3. An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"
|
||||
// -> An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6"
|
||||
if (token.is_end_tag() && token.tag_name().is_one_of(HTML::TagNames::h1, HTML::TagNames::h2, HTML::TagNames::h3, HTML::TagNames::h4, HTML::TagNames::h5, HTML::TagNames::h6)) {
|
||||
// If the stack of open elements does not have an element in scope that is an HTML element and whose tag name is one of "h1", "h2", "h3", "h4", "h5", or "h6", then this is a parse error; ignore the token.
|
||||
if (!m_stack_of_open_elements.has_in_scope(HTML::TagNames::h1)
|
||||
|
@ -2323,6 +2323,12 @@ void HTMLParser::handle_in_body(HTMLToken& token)
|
|||
return;
|
||||
}
|
||||
|
||||
// -> An end tag whose tag name is "sarcasm"
|
||||
if (token.is_end_tag() && token.tag_name().is_one_of("sarcasm"_fly_string)) {
|
||||
// Take a deep breath, then act as described in the "any other end tag" entry below.
|
||||
goto AnyOtherEndTag;
|
||||
}
|
||||
|
||||
// -> A start tag whose tag name is "a"
|
||||
if (token.is_start_tag() && token.tag_name() == HTML::TagNames::a) {
|
||||
// If the list of active formatting elements contains an a element between the end of the list and the last marker on the list (or the start of the list if there
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue