Page MenuHomePhabricator

Use supplied link text rather than display title when link text matches page title except for case of first character
Closed, ResolvedPublic

Description

Setup

  • MediaWiki 1.29.1 (ef41aab) 00:01, 3 November 2017
  • PHP 5.6.30-0+deb8u1 (apache2handler)
  • DisplayTitle 1.5.1 (9ca95b6) 03:23, 3 November 2017

Issue
I think this extension should honor the alternative link label if provided, e.g. show "displayTitle" in case it was explicitly defined with [[DisplayTitle|displayTitle]] instead of "Changed display title example" which was added to the "DisplayTitle" page with {{DISLPLAYTITLE:Changed display title example}}.

Live example:

Side note: What wonders me is that [[DisplayTitle|displaytitle]] renders as "displaytitle" whereas [[DisplayTitle|displayTitle]] renders as "Changed display title example". Hmm ...

Event Timeline

In my initial report I mostly focused on describing a solution than actually elaborating on the issue I would like to solve.

The issue basically is that if I set a display title on a page the first letter will in most cased be an upper case character. However when I am linking to that very page from another page within a text this upper case character is being preserved thought since I am in the middle of some text I would like in most cases the first letter to be a lower case character.

To cut it short I would like to have "On this page I am adding a link to the changed display title example" instead of the current "On this page I am adding a link to the Changed display title example".

I figure that explicitly setting an alternative label may be a solution if honored.

Change 393000 had a related patch set uploaded (by Cicalese; owner: Cindy Cicalese):
[mediawiki/extensions/DisplayTitle@master] Fix override of link text.

https://gerrit.wikimedia.org/r/393000

Change 393000 merged by Cicalese:
[mediawiki/extensions/DisplayTitle@master] Fix override of link text.

https://gerrit.wikimedia.org/r/393000

CCicalese_WMF renamed this task from To honor alternative link label to Use supplied link text rather than display title when link text matches page title except for case of first character.Nov 24 2017, 5:14 PM
cicalese claimed this task.
cicalese removed a project: Patch-For-Review.