- Issue created by @charles belov
It is possible to include spaces in anchor link names. This is invalid HTML.
This is a regression from CKEditor 4. See issue Anchor name can invalidly include spaces #5305 and pull Disallow creating anchors with space characters #5362.
Standard cited for this issue: HTML 5.2 Recommendation concerning the ID attribute.
When specified on HTML elements, the id attribute value must be unique amongst all the IDs in the elementโs tree and must contain at least one character. The value must not contain any space characters.
1. As an admin, enable the anchor plug-in in the CKEditor5 WYSIWYG toolbar
2. As an editor, edit a node body
3. Click the anchor icon in the toolbar
4. In the anchor name field, type "beforespace afterspace" (without the quotes)
5. Click the check
Expected result: get an error message
Actual result: anchor is inserted with a space in the name
Filed with CKEditor5 as Anchor name can invalidly include spaces #18467
Active
11.1 ๐ฅ
ckeditor5.module
The issue is blocked on something in a non-Drupal project.