summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Echo/includes/formatters/PresentationModelSectionTrait.php')
-rw-r--r--Echo/includes/formatters/PresentationModelSectionTrait.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/Echo/includes/formatters/PresentationModelSectionTrait.php b/Echo/includes/formatters/PresentationModelSectionTrait.php
index 7d0e6b9f..00f9e318 100644
--- a/Echo/includes/formatters/PresentationModelSectionTrait.php
+++ b/Echo/includes/formatters/PresentationModelSectionTrait.php
@@ -70,11 +70,7 @@ trait EchoPresentationModelSectionTrait {
protected function getTitleWithSection() {
$title = $this->event->getTitle();
$section = $this->getParsedSectionTitle();
- // Like Parser::guessSectionNameFromWikiText() but without the link stripping
- $fragment = Sanitizer::escapeId(
- Sanitizer::normalizeSectionNameWhitespace( $section ),
- 'noninitial'
- );
+ $fragment = substr( Parser::guessSectionNameFromStrippedText( $section ), 1 );
if ( $section ) {
$title = Title::makeTitle(
$title->getNamespace(),
@@ -86,7 +82,7 @@ trait EchoPresentationModelSectionTrait {
}
protected function getTruncatedSectionTitle() {
- return $this->language->embedBidi( $this->language->truncate(
+ return $this->language->embedBidi( $this->language->truncateForVisual(
$this->getParsedSectionTitle(),
self::SECTION_TITLE_RECOMMENDED_LENGTH,
'...',