Make WordPress Core

Opened 22 hours ago

Closed 19 hours ago

#64485 closed defect (bug) (fixed)

WP_Block_Processor should indicate that inner HTML matches no block type.

Reported by: dmsnell's profile dmsnell Owned by: dmsnell's profile dmsnell
Milestone: 6.9.1 Priority: normal
Severity: normal Version: 6.9
Component: Editor Keywords: has-patch
Focuses: Cc:

Description

When the Block Processor was introduced there was a latent bug in the is_block_type() method. It misreports the block types when inner HTML is involved, as it was written before the concepts of inner HTML and top-level freeform content were separated.

It should only report block type matches for actual block delimiters and for top-level freeform content.

Change History (2)

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


22 hours ago
#1

  • Keywords has-patch added

Trac ticket: Core-64485

## Status

  • [ ] Add unit tests exposing the bug and demonstrating the fix.

## Summary

Previously, the WP_Block_Processor class was making a mistake in mis-reporting whether a token matches a block type when #innerHTML spans are involved.

This patch fixes the logic, which was originally written before a distinction between inner HTML and top-level freeform content was built.

#2 @dmsnell
19 hours ago

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

In 61452:

Block Processor: Fix is_block_type() for inner HTML

Previously, the WP_Block_Processor class was making a mistake in
mis-reporting whether a token matches a block type when #innerHTML spans
are involved.

This patch fixes the logic, which was originally written before a
distinction between inner HTML and top-level freeform content was built.

Developed in https://github.com/WordPress/wordpress-develop/pull/10701
Discussed in https://core.trac.wordpress.org/ticket/64485

Fixes #64485.

Note: See TracTickets for help on using tickets.