Make WordPress Core

Opened 7 months ago

Closed 7 months ago

Last modified 4 weeks ago

#58907 closed enhancement (fixed)

HTML API: Add support for SPAN element.

Reported by: dmsnell's profile dmsnell Owned by: bernhard-reiter's profile Bernhard Reiter
Milestone: 6.4 Priority: normal
Severity: normal Version: 6.3
Component: HTML API Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

In this patch we're introducing support for the SPAN element, which is the first in the class of "any other tag" in the "in body" insertion mode.

This patch introduces the mechanisms required to handle that class of tags but only introduces SPAN to keep the change focused. With the tests and mechanisms in place it will be possible to follow-up and add another limited set of tags.

It's important that this not use the default catch-all in the switch handling step_in_body because that would catch tags that have specific rules in previous case statements that aren't yet added. For example, we don't want to treat the TABLE element as "any other tag".

Change History (10)

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


7 months ago
#1

  • Keywords has-unit-tests added

See #58907-trac

In this patch we're introducing support for the SPAN element, which is the first in the class of "any other tag" in the "in body" insertion mode.

This patch introduces the mechanisms required to handle that class of tags but only introduces SPAN to keep the change focused. With the tests and mechanisms in place it will be possible to follow-up and add another limited set of tags.

It's important that this not use the default catch-all in the switch handling step_in_body because that would catch tags that have specific rules in previous case statements that aren't yet added. For example, we don't want to treat the TABLE element as "any other tag".

@dmsnell commented on PR #4913:


7 months ago
#2

cc: @ockham @luisherranz

@Bernhard Reiter commented on PR #4913:


7 months ago
#3

Quick note (for myself and others), the e2e test that's currently failing is about GB plugin activation.

This typically happens when there's a name collision between Core and GB; we should check manually what happens when we install the stable version of the GB plugin and activate it while using this branch.

(Also, ideally I should fix that test to expose the exact error rather than just showing a more generic error upon plugin activation attempt 🤔 )

@dmsnell commented on PR #4913:


7 months ago
#4

thanks @ockham - I'm not sure because I just tested trunk Gutenberg with this branch in Core (rebased against the latest trunk) on my local machine and had no such problems.

@Bernhard Reiter commented on PR #4913:


7 months ago
#5

Yeah, the e2e test is with the stable version of the plugin. Maybe that has a collision -- but it's a good sign if it's not happening in trunk>

@dmsnell commented on PR #4913:


7 months ago
#6

@ockham same no-error situation with 16.3.0, which is what was installed through wp-admin when I added Gutenberg from the registry

@dmsnell commented on PR #4913:


7 months ago
#7

@ockham it looks like this test is failing universally at the moment and is unlikely related to this PR. I hope this is the case because I can't make sense of how it could be causing the failure.

#8 @Bernhard Reiter
7 months ago

  • Owner set to Bernhard Reiter
  • Resolution set to fixed
  • Status changed from new to closed

In 56331:

HTML API: Add support for SPAN element.

In this patch we're introducing support for the SPAN element, which is the first
in the class of "any other tag" in the "in body" insertion mode.

This patch introduces the mechanisms required to handle that class of tags but
only introduces SPAN to keep the change focused. With the tests and mechanisms
in place it will be possible to follow-up and add another limited set of tags.

It's important that this not use the default catch-all in the switch handling
step_in_body because that would catch tags that have specific rules in previous
case statements that aren't yet added. For example, we don't want to treat the
TABLE element as "any other tag".

Props dmsnell.
Fixes #58907.

#10 @swissspidy
4 weeks ago

  • Milestone changed from Awaiting Review to 6.4
Note: See TracTickets for help on using tickets.