Commit b4fda213 authored by Rob Phillips's avatar Rob Phillips
Browse files

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

parent 2717ff06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;