[wp-trac] [WordPress Trac] #62505: Page editor adding <p> around <a> and </a> when using <figure>
WordPress Trac
noreply at wordpress.org
Sat Nov 30 22:46:08 UTC 2024
#62505: Page editor adding <p> around <a> and </a> when using <figure>
----------------------------------------------+----------------------------
Reporter: jasonmader | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting
| Review
Component: General | Version: 6.7
Severity: normal | Resolution: invalid
Keywords: has-testing-info has-screenshots | Focuses:
----------------------------------------------+----------------------------
Changes (by sppramodh):
* status: new => closed
* resolution: => invalid
Comment:
The Block Editor (Gutenberg) relies on **block delimiters** to save and
interpret content accurately. These delimiters, such as {{{<!--
wp:paragraph -->}}} or {{{<!-- wp:html -->}}}, allow the editor to
differentiate block types and render content correctly in both the editor
and on the front end.
When HTML is added directly into the Code Editor without these delimiters,
Gutenberg cannot recognize the content as a structured block. This can
result in unexpected rendering, especially with nested HTML elements. To
ensure proper handling, it is recommended to use the appropriate block
delimiters when adding custom HTML.
It's worth noting that there are open issues in the Gutenberg GitHub
repository addressing similar or related behavior, highlighting the
challenges in implementing seamless conversion of raw code into structured
blocks. This indicates that the complexity of accurately parsing and
interpreting raw HTML while maintaining block integrity is a topic still
under active discussion and refinement within the community.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62505#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list