Page MenuHomePhabricator

DISPLAYTITLE custom formatting break after an open parenthesis
Closed, DeclinedPublic

Description

{{DISPLAYTITLE:''Sweet Dreams (Are Made of This)''}} will print Sweet Dreams in italic, then from the open parenthesis, will ignore any styling markup.

This isn't consistent, as Lua allows to pass a string with parenthesis to the DISPLAYTITLE parser function: https://en.wikipedia.org/w/index.php?title=Module:Italic_title&oldid=581780064.

[ History ]

In 2006, in bug 8394, Brion Vibber, states: “The display title should indeed not contain any links or formatting codes.”

This behavior is reported to have been introduced in MediaWiki 1.9 according the same bug.

This doesn't match the last 8 years practice of our main users, Wikipedia projects, as italic titles are now widely use on Wikipedia projects for entertainment and artistic works' titles.

[ Credit ]

Thank you to LeJC and Linedwell from the French Wikipedia to have reported this bug.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=8394

Details

Reference
bz60216

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:05 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz60216.
bzimport added a subscriber: Unknown Object (MLST).

When using the wiki syntax '{{DISPLAYTITLE:''Sweet Dreams (Are Made of This)''}}' on [[Sweet Dreams (Are Made of This)]] the whole title is italic.

The template/module was build to skip the part of the parenthesis, see template documentation. The documentation says, that you can use {{italic title|all=yes}} to force the whole title to be in italic.

WORKSFORME

I'm reopening at UNCO, as the following works on en.wikipedia, but not on fr.wikipedia:

{{DISPLAYTITLE:''Sweet Dreams (Are Made of This)''}}

It does work on a genuine MediaWIki installation.

[[fr:Sweet Dreams (Are Made of This)]]

Clear the whole page and include the wikitext from above and press preview -> WORKSFORME

Also works when added as last line, so there is a DISPLAYTITLE before, which override your inserted DISPLAYTITLE. The english template wrotes, that the user should try to insert it after existing infobox to avoid override due to the infobox.

Sounds like frwiki has a similar module/template to get this, which is used on the page. [[fr:Modèle:Titre en italique]] sounds like the right page here.

See bug 50449 for a possible fix to avoid this situation.