Skip to content

Commit

Permalink
fix: prevent dash from appearing in page title when an entity does no…
Browse files Browse the repository at this point in the history
…t have a name
  • Loading branch information
kulbakin committed Aug 10, 2014
1 parent 4e7bfa8 commit ab7d0e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/site/components/com_base/dispatchers/default.php
Expand Up @@ -120,7 +120,7 @@ public function setPageTitle(KCommandContext $context)
$description = $item->body;
}

$title = implode(' - ', array_unique($title));
$title = implode(' - ', array_filter(array_unique($title)));
$document->setTitle($title);
$description = preg_replace('/\s+/', ' ', $description);
$description = htmlspecialchars($view->getTemplate()->renderHelper('text.truncate', $description, array('length' => 160)));
Expand Down

0 comments on commit ab7d0e6

Please sign in to comment.