Issue Bug Closed

#96485CKEditor : allowAttribs in YAML not taken into account / attributes are removed at save

RVVN no-lastname-given 01/07/22, 21:42 updated 12/02/25, 14:33

Description

Hi,

the following YAML configuration for CKEditor is not taken into account :

processing:
  HTMLparser_db:
    tags:
      a:
        allowedAttribs:
          - class
          - title
          - target
          - href

All attributes are removed when saving content element.

I’ve found the source of this issue in the HtmlParser (line 481) : https://github.com/TYPO3/typo3/blob/10.4/typo3/sysext/core/Classes/Html/HtmlParser.php#L481

The key ‘_allowedAttribs’ doesn’t exist.

Replacing it with ‘allowedAttribs.’ fixes the problem.

Reviews 2

History 616

  1. Eric Harrer commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-03-25T09:55:08+00:00" > 03/25/25, 09:55 </span>

    Applied in changeset commit:48673310321c42c99f54cd6a02058307c0d105fe.