Problem/Motivation
Hi! When I enable the "Enable term glossary" option for a body field, that uses a text format (no html tag/attr limitations) that allows:
1. setting text color, font size (CKEditor 5 Font Plugins module),
2. adding icons in text (UI Icons for CKEditor 5 module),
the "style" attribute of the of the text color, font size elements (p.1) dissapears;
and the SVG from the dissapear as well.
(see image-1-with-issue.png)
Before I enabled the "Enable term glossary" option, all attributes/SVG were in place.
(see image-2-no-issue.png)
It seems to me the term_glossary module agressively filters all the field's content/html and removes not related data.
Steps to reproduce
Drupal 11.3.11 (no patches).
PHP 8.4
1. Add some elements like icons (UI Icons for CKEditor 5 module) or apply text color/size with CKEditor 5 Font Plugins module to a text formatted field.
2. Make sure the things render fine (see image-2-no-issue.png).
3. Enable the term_glossary module.
4. Enable the "Enable term glossary" option for that text formatted field (entity view mode -> field format).
5. See that the things from p.1 are broken, their attributes (or SVG) are removed (see image-1-with-issue.png).
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| image-2-no-issue.png | 301.59 KB | serhii-che | |
| image-1-with-issue.png | 250.13 KB | serhii-che |
Issue fork term_glossary-3606615
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
serhii-che commentedComment #5
mably commentedHi @serhii-che, thanks for the report, can you give a try to MR 58?
Comment #6
serhii-che commentedMR58 is working perfectly. Thank you very much @mably!
Comment #8
mably commentedYou're welcome @serhii-che!
Let's merge this.
Comment #10
mably commentedVersion 4.5.1 including the fix has been released.