Issue Feature Resolved

#87314allowedAttribs / allowAttributes usage in config

Sebastian Fischer 12/31/18, 13:45 updated 09/23/26, 21:20

Description

There is some inconsistency in the configuration.

HTMLparser_DB uses a parameter allowedAttribs
while processing uses a parameter allowAttributes

This leaves lot of room of mistakes because the functionaly of both are comparable for the respective section.

Reviews 2

History 59

  1. Benni Mack commented <span data-processor="relativetime" data-value="2026-09-23T17:34:11+00:00" > 09/23/26, 17:34 </span>

    Hi,

    I looked at this again. The two options are not the same thing, so I don’t think they can be merged into one name.

    allowedAttribs belongs to the HTML parser (HTMLparser_db). You set it per tag, for example tags.hr.allowedAttribs = class. It says which attributes that tag may keep when the content is saved. It takes a comma list, and 0 means “remove all attributes”.

    allowAttributes belongs to the RTE processing options. It is not a general setting. It only decides which attributes a

    tag may keep. It is set once and applies to all paragraphs. Other tags are not affected by it.

    So one is “per tag, any tag” and the other is “all paragraphs”. The names look similar, but they are used in different places.

    What was really wrong:

    - The comment in the CKEditor Processing.yaml called allowAttributes “allowed default attributes”. That suggested it works for all tags. I changed the comment to say it is for

    tags only and to point to allowedAttribs for other tags.
    - allowAttributes only worked as an array (allowAttributes.). A comma list like allowAttributes = class,id was ignored, while other options like allowTagsOutside accept both. That is fixed now.

    Both changes are in one patch. I did not rename anything, because that would break existing configuration and the two options do different jobs.

  2. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-23T18:50:13+00:00" > 09/23/26, 18:50 </span>

    Applied in changeset commit:2cf43628333f6f59d953f56ffb334222ff460835.

  3. Gerrit Code Review pushed patch set 2 for 14.3 to change 96015 status Resolved Under Review <span data-processor="relativetime" data-value="2026-09-23T20:51:14+00:00" > 09/23/26, 20:51 </span>

  4. Benni Mack commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-09-23T21:20:12+00:00" > 09/23/26, 21:20 </span>

    Applied in changeset commit:44ca58e77d499e9ee9709c2fb47edde982396918.