Self-closing tags with trailing slash in CKEditor 4

Created on 9 March 2023, almost 2 years ago
Updated 30 March 2023, almost 2 years ago

Problem/Motivation

Certain cases when hard limit is enabled over CKEditor 4 fields and self-closing tags contain a trailing slash, like in CKEditor 4 the JavaScript considers the given tag as closing tag, even though we are still in an open tag and it might produce a warning dialogue to the user. This dialogue will disappear after clicking "OK" but it should not happen.

Steps to reproduce

Use a self-closing tag with " />" (<br />) within a paragraph or span element.

Proposed resolution

Remove the legacy if statement that removes the html tags based on "/>" characters when self-closing tags were added and later removed from the tags_open array.

Remaining tasks

  • ✅ Get maintainer approval for the proposed resolution
  • ✅ Implement resolution
  • ✅ Write test coverage (contact a maintainer if you need help)
  • ✅ Maintainer review via the UI
  • ✅ Maintainer Code Review #1
  • ✅ Maintainer code review #2
  • ✅ Merge into dev branch, with credit to author and participants
🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇧🇪Belgium joevagyok

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024