mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-30 18:45:07 +00:00
PresentationModelSectionTrait: Use section anchor generation from code
We used to have to DIY it because the core method stripped links, but with guessSectionNameFromStrippedText() this is no longer an issue. This allows us to pick up the nbsp handling that was added to core in 129067c907. Bug: T180689 Depends-On: I56b9dda805a51517549c5ed709f4bd747ca04577 Change-Id: I192218dd14464de5041ceb1c16125bbcd8f44f18
This commit is contained in:
parent
0adee63a82
commit
babd3f76d3
|
@ -70,8 +70,7 @@ trait EchoPresentationModelSectionTrait {
|
|||
protected function getTitleWithSection() {
|
||||
$title = $this->event->getTitle();
|
||||
$section = $this->getParsedSectionTitle();
|
||||
// Like Parser::guessSectionNameFromWikiText() but without the link stripping
|
||||
$fragment = Sanitizer::normalizeSectionNameWhitespace( $section );
|
||||
$fragment = substr( Parser::guessSectionNameFromStrippedText( $section ), 1 );
|
||||
if ( $section ) {
|
||||
$title = Title::makeTitle(
|
||||
$title->getNamespace(),
|
||||
|
|
Loading…
Reference in a new issue