Skip to content

Adding a link to text with a soft return produces multiple anchor tags #478

@ec-propaganda

Description

@ec-propaganda

Description

When I have a link that should contain a soft return (<br>), instead of one anchor tag with a <br> inside of it, the text on either side of the <br> is wrapped in its own <a> tag, producing two links instead of one.

Steps to reproduce

  1. Add a CKEditor field to a page
  2. Put some text with a soft return in it (such as an address)
  3. Select the text and use the toolbar button to add a link to it
  4. Use the "source" button to look at the HTML code and observe that there are two anchor tags instead of one

Additional info

  • Craft version: 4.16.14
  • PHP version: 8.2
  • Database driver & version: Postgres 17
  • Plugins & versions: CKEditor 3.14.1

Screenshots

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions