The code in OutputPage::getUnprefixedDisplayTitle() seems broken. It likely doesn't work on multilingual wikis or Translate pages where page language is different from the content language, it probably doesn’t properly reflect the user’s chosen variant, it might not handle gendered namespaces, etc. The solution is probably to tweak the way the Parser and the DISPLAYTITLE parser function work in order to keep the namespace and the unprefixed title separate.
Description
Details
Related Objects
- Mentioned In
- T293514: Unify ParserOutput::{get,set}{TitleText,DisplayTitle}
T310526: Parsoid read views doesn't support -{T|...}- page title markup - Mentioned Here
- T36514: The language and the direction of the title in first heading should depend on page content language instead of user interface language
Event Timeline
Change 810114 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):
[mediawiki/core@master] WIP: Don't allow {{DISPLAYTITLE}} and -{T|..}- to override namespace l10n
Change 946988 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):
[mediawiki/core@master] Store DISPLAYTITLE components in split form
Change 946989 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):
[mediawiki/core@master] WIP: use split display title in OutputPage/EditPage/Article
The display title should probably include a language component as well, so we can properly set lang/dir attributes: T36514: The language and the direction of the title in first heading should depend on page content language instead of user interface language.