Skip to content

7 tests assume non-compliant step-order in foreign content #173

Open
whatwg/html
#9809
@not-my-profile

Description

@not-my-profile

The rules for parsing tokens in foreign content currently say:

Any other end tag
Run these steps:

  1. Initialize node to be the current node (the bottommost node of the stack).
  2. If node's tag name, converted to ASCII lowercase, is not the same as the tag name of the token, then this is a parse error.
  3. Loop: If node is the topmost element in the stack of open elements, then return. (fragment case)
  4. If node's tag name, converted to ASCII lowercase, is the same as the tag name of the token, pop elements from the stack of open elements until node has been popped from the stack, and then return.
  5. Set node to the previous entry in the stack of open elements.
  6. If node is not an element in the HTML namespace, return to the step labeled loop.
  7. Otherwise, process the token according to the rules given in the section corresponding to the current insertion mode in HTML content.

However if you actually implement that 7 tree-construction test cases of this repository fail:

  • foreign-fragment-3
  • math-5
  • math-6
  • math-7
  • svg-5
  • svg-6
  • svg-7

Apparently the test cases assume that the 7th step is performed as step 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions