diff -u b/core/modules/taxonomy/src/TermBreadcrumbBuilder.php b/core/modules/taxonomy/src/TermBreadcrumbBuilder.php --- b/core/modules/taxonomy/src/TermBreadcrumbBuilder.php +++ b/core/modules/taxonomy/src/TermBreadcrumbBuilder.php @@ -67,24 +67,25 @@ // dependency even though it is not shown in the breadcrumb because e.g. its // parent might have changed. $breadcrumb->addCacheableDependency($term); - // @todo This overrides any other possible breadcrumb and is a pure - // hard-coded presumption. Make this behavior configurable per - // vocabulary or term. - $parents = $this->termStorage->loadAllParents($term->id()); - // Remove current term being accessed. - array_shift($parents); + if (in_array($route_match->getRouteName(), array( 'entity.taxonomy_term.edit_form', 'entity.taxonomy_term.delete_form', ))) { $term = $this->entityManager->getTranslationFromContext($term); - $breadcrumb->addLink(Link::createFromRoute(\Drupal\Component\Utility\Html::escape($term->getName()), 'entity.taxonomy_term.canonical', array('taxonomy_term' => $term->id()))); + $breadcrumb->addLink(Link::createFromRoute($term->getName(), 'entity.taxonomy_term.canonical', array('taxonomy_term' => $term->id()))); } else { + // @todo This overrides any other possible breadcrumb and is a pure + // hard-coded presumption. Make this behavior configurable per + // vocabulary or term. + $parents = $this->termStorage->loadAllParents($term->id()); + // Remove current term being accessed. + array_shift($parents); foreach (array_reverse($parents) as $term) { $term = $this->entityManager->getTranslationFromContext($term); $breadcrumb->addCacheableDependency($term); - $breadcrumb->addLink(Link::createFromRoute(\Drupal\Component\Utility\Html::escape($term->getName()), $route_match->getRouteName(), array('taxonomy_term' => $term->id()))); + $breadcrumb->addLink(Link::createFromRoute($term->getName(), $route_match->getRouteName(), array('taxonomy_term' => $term->id()))); } }