FilterCaption hard-codes allowed tags

Created on 18 June 2015, about 9 years ago
Updated 20 March 2024, 3 months ago

Problem/Motivation

The FilterCaption plugin currently hard-codes which tags are allowed in image captions:

      $html_filter = $this->filterManager->createInstance('filter_html', [
        'settings' => [
          'allowed_html' => '<a href hreflang target rel> <em> <strong> <cite> <code> <br>',
          'filter_html_help' => FALSE,
          'filter_html_nofollow' => FALSE,
        ],
      ]);

There are many other inline HTML tags that one might want to use in image captions, so this should probably be configurable.

Proposed resolution

Make these tags configurable.

Remaining tasks

  • Allow attribute whitelisting.

User interface changes

Would add configuration for the image caption filter.

Data model changes

Adds configuration options.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
FilterΒ  β†’

Last updated about 21 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States jhedstrom Portland, OR

Live updates comments and jobs are added and updated live.
  • wysiwyg

    Involves an in-browser What-You-See-Is-What-You-Get content editor.

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.69.0 2024