Make allowed tags configurable

Created on 29 June 2022, almost 3 years ago
Updated 30 August 2023, over 1 year ago

Problem/Motivation

Currently the allowed tags are hard-coded:

  /**
   * List of allowed tags.
   *
   * @var array
   */
  protected $allowedTags = [
    '<drupal-render-placeholder>',
    '<embed>',
    '<hr>',
    '<iframe>',
    '<img>',
    '<input>',
    '<link>',
    '<object>',
    '<script>',
    '<source>',
    '<style>',
    '<video>',
  ];

Let's see if there's real demand to make them configurable. I'll postpone this for real-world feedback from users.

Steps to reproduce

Proposed resolution

Save this to a config variable. As https://www.php.net/manual/de/function.strip-tags.php allows a string as second parameter, we could use a string instead of the array for simplification then.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Postponed

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024