Skip to content
Snippets Groups Projects
Commit b4fda213 authored by Rob Phillips's avatar Rob Phillips
Browse files

Issue #3324145 by robphillips: Strip HTML tags from labels.

parent 2717ff06
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,7 @@ function entity_label_render(EntityInterface $entity, string $type = 'singular')
/** @var \Drupal\Core\Config\Entity\ConfigEntityBundleBase $bundle */
$bundle = \Drupal::entityTypeManager()->getStorage($entityTypeId)->load($entity->bundle());
$settings = $bundle->getThirdPartySettings('entity_label');
$cache[$key] = $settings["label_$type"] ?? NULL;
$cache[$key] = $settings["label_$type"] ? strip_tags($settings["label_$type"]) : NULL;
return $cache[$key];
}
return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment