Make WordPress Core

Opened 6 months ago

Closed 3 months ago

Last modified 3 months ago

#62363 closed defect (bug) (fixed)

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 fixed-major dev-reviewed
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 (15)

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


6 months 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
6 months 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
6 months 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
6 months ago

  • Version set to 6.7

#6 @jonsurrell
5 months ago

  • Milestone changed from 6.7.1 to 6.7.2

Punting to 6.7.2, this is not urgent.

This ticket was mentioned in Slack in #core by jorbin. View the logs.


4 months ago

#8 @nazmul111
4 months ago

This #PR closed so its already fixed or no need to do anything?

#9 @jonsurrell
4 months ago

The change was merged to trunk but not 6.7 branch for inclusion in 6.7.2. [59392] would need to be backported to the 6.7 branch.

This ticket was mentioned in Slack in #core by jorbin. View the logs.


3 months ago

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


3 months ago
#11

This cherry-picks r59392 into the 6.7 branch.

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

#13 @westonruter
3 months ago

  • Keywords dev-reviewed added; dev-feedback removed

@jorbin LGTM

#14 @jorbin
3 months ago

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

In 59694:

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.

Reviewed by westonruter, jorbin.
Merges [59392] to the 6.7 branch.

Props jonsurrell, bernhard-reiter.
Fixes #62363.

Note: See TracTickets for help on using tickets.