diff --git a/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php b/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php index 3e17e80..f7eb05e 100644 --- a/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php +++ b/core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php @@ -271,7 +271,7 @@ protected static function matchEntityByTitle(SelectionInterface $handler, $input // More helpful error if there are only a few matching entities. $multiples = array(); foreach ($entities as $id => $name) { - $multiples[] = $name . ' (' . $id . ')'; + $multiples[] = strip_tags($name) . ' (' . $id . ')'; } $params['@id'] = $id; $form_state->setError($element, t('Multiple entities match this reference; "%multiple". Specify the one you want by appending the id in parentheses, like "@value (@id)".', array('%multiple' => implode('", "', $multiples))));