WordPress.org

Make WordPress Core

#47716 closed defect (bug) (worksforme)

Split links are created when creating links that contain HTML elements.

Reported by: cwpnolen Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.2.2
Component: Editor Keywords:
Focuses: Cc:

Description

When creating a link that contains partial text that is italic, bold or contains a superscript or subscript content the rendered HTML has multiple links instead of one.

Steps to Reproduce

  1. Enter "Lorem ipsum dolor sit amet, consectetur adipiscing elit" into a "Paragraph" block.
  2. Select "dolor" and make the text bold.
  3. Select "ipsum dolor sit" and make it link to "https://www.google.com"
  4. Publish or update the post.
  5. View the front-end of the site and hover over each work.

Notice each word is its own link instead of being a single link

When doing similar steps in the "Classic" block or in the TinyMCE editor, the links are not split.

Attachments (1)

split-links-source-code.png (49.3 KB) - added by cwpnolen 11 months ago.
Screenshot of rendered HTML

Download all attachments as: .zip

Change History (2)

@cwpnolen
11 months ago

Screenshot of rendered HTML

#1 @pento
11 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Thank you for the bug report, @cwpnolen!

This bug appears to be fixed in the Gutenberg plugin, so the fix will be included in WordPress 5.3.

We appreciate the testing and bug reporting, please let us know of any other bugs you run into. 🙂

Note: See TracTickets for help on using tickets.