Closed mauke closed 1 year ago
I've not looked at the spec yet, but this would probably be the section to check for the correct behavior.
The relevant section is this one: https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state
After seeing </
(followed by a letter) in a <script>
element, we end up in the "script data end tag name" state. Here we accumulate letters into the name of a temporary tag. On seeing whitespace (space, tab, line feed, form feed), we check that the temporary tag name matches "script"; if so, we stop script parsing (treating the characters found as a script
end tag) and continue parsing for attributes.
Now, end tags with attributes are technically an error: https://html.spec.whatwg.org/multipage/parsing.html#parse-error-end-tag-with-attributes But a forgiving parser will simply ignore them.
Steps to reproduce the behavior
Expected behavior
Output similar to:
An (implicitly closed)
p
element exists, so it should be found.Actual behavior
No output.