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

CommentFileSizeAuthor
image-2-no-issue.png301.59 KBserhii-che
image-1-with-issue.png250.13 KBserhii-che
Command icon 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

serhii-che created an issue. See original summary.

serhii-che’s picture

Issue summary: View changes

mably made their first commit to this issue’s fork.

mably’s picture

Status: Active » Needs review

Hi @serhii-che, thanks for the report, can you give a try to MR 58?

serhii-che’s picture

MR58 is working perfectly. Thank you very much @mably!

  • mably committed a5a68150 on 4.x
    fix: #3606615 The "Enable term glossary" option removes not related html...
mably’s picture

Status: Needs review » Fixed

You're welcome @serhii-che!

Let's merge this.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mably’s picture

Version 4.5.1 including the fix has been released.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.