Make WordPress Core

Opened 5 weeks ago

Last modified 3 weeks ago

#62363 reopened defect (bug)

HTML API: Expects closer should report true on svg:input element

Reported by: jonsurrell's profile jonsurrell Owned by: jonsurrell's profile jonsurrell
Milestone: 6.7.2 Priority: normal
Severity: normal Version: 6.7
Component: HTML API Keywords: has-patch has-unit-tests dev-feedback fixed-major
Focuses: Cc:

Description

Some tags that look like void elements can be added in other namespaces. <input> is a good example.

expects_closer is intended to indicate whether a given should be closed by another tag or if it's self-closing in some way (void, "atomic," etc.).

This input tag is a void tag, expects_closer correctly returns true on the input token:

<body><input>

This input tag is not a void tag. It's a tag in the svg namespace, expects_closer should return false on the input token, but it returns true:

<svg><input>

Change History (6)

This ticket was mentioned in PR #7752 on WordPress/wordpress-develop by @jonsurrell.


5 weeks ago
#1

  • Keywords has-patch has-unit-tests added

Ensure that expects_closer returns false on tags that look like void HTML tags, but are actually _not_ void tags in foreign content.

Some tags that look like void elements can be added in other namespaces. <input> is a good example.

expects_closer is intended to indicate whether a given should be closed by another tag or if it's self-closing in some way (void, "atomic," etc.).

This input tag is a void tag, expects_closer correctly returns true on the input token:

<body><input>
This input tag is not a void tag. It's a tag in the svg namespace, expects_closer should return false on the input token, but it returns true:

<svg><input>

Trac ticket: https://core.trac.wordpress.org/ticket/62363

#2 @Bernhard Reiter
4 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 59392:

HTML API: Expect closer on foreign content void lookalike elements.

Ensure that expects_closer returns false on tags that look like void HTML tags, but are actually not void tags in foreign content.

Props jonsurrell, bernhard-reiter.
Fixes #62363.

#4 @Bernhard Reiter
4 weeks ago

  • Keywords dev-feedback fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening to seek approval by another committer to backport to the 6.7 branch.

#5 @jonsurrell
4 weeks ago

  • Version set to 6.7

#6 @jonsurrell
3 weeks ago

  • Milestone changed from 6.7.1 to 6.7.2

Punting to 6.7.2, this is not urgent.

Note: See TracTickets for help on using tickets.