List field "allowed values list" strips HTML from label

Created on 24 October 2019, about 6 years ago
Updated 28 September 2025, about 1 month ago

Problem/Motivation

While using a "list" field type and adding items to the "Allowed values", there is a list of "Allowed HTML tags in labels".
Any HTML in a label is being stripped out of the label.
This concerns only when the label is displayed, in a form no HTML is allowed inside an <option> tag.

Steps to reproduce

Configure a list field with HTML in the allowed values label and display it.

Proposed resolution

Remaining tasks

  • Verify the bug still exists
  • Add/modify tests to assert the HTML is being stripped when is displayed inside an <option> tag and displayed when the label is rendered
  • Write code that allows HTML when displaying the label

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component

field system

Created by

πŸ‡ΊπŸ‡ΈUnited States greatmatter

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

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

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.

No activities found.

Production build 0.71.5 2024