Page MenuHomePhabricator

Stray italic/bold apostrophes in <ref> tags appear outside ref in ref list
Open, LowPublic

Description

On the live en.Wikipedia (but not en.Wikisource), if you add a reference such as:

<ref>'''ex''ample'</ref>

to an article, the following will appear in the <references/> list:

1. '^ example'

with the text in bold, and an apostrophe before the "^" link, rather than something like the following, which appears on other wikis, and follows expected behaviour:

1. ^ 'example'

Event Timeline

Yodin raised the priority of this task from to Low.
Yodin updated the task description. (Show Details)
Yodin subscribed.
Yodin removed projects: Cite, MediaWiki-Parser.
Yodin set Security to None.
Yodin removed a subscriber: Dereckson.
Yodin renamed this task from Stray italic/bold apostrophes in <ref> tags appear outside ref list to Stray italic/bold apostrophes in <ref> tags appear outside ref in ref list.Jul 13 2015, 4:57 PM
Yodin updated the task description. (Show Details)

The reason for this behavior are the ''' in the message https://en.wikipedia.org/wiki/MediaWiki:Cite_references_link_one. For reference, this is the modified message:

<li id="$1"$4><span class="mw-cite-backlink">'''[[#$2|^]]'''</span> $3</li>

For comparison, this is the original message:

<li id="$1"$4><span class="mw-cite-backlink">[[#$2|↑]]</span> $3</li>

When combined, the resulting wikitext is something like ''' italics ''' bold ''' italics '' normal ' where the second and third occurrence of ''' become a pair, but not the first and second as originally intended. I'm not sure there is anything we can do here other than ask the community to update the message to either use <b> or – ideally – CSS. As of now 29 communities use ''' in this message. Only 1 uses <b>.

The underlying design issue is that the elements in this message are not parsed independent from each other, but as a single chunk of wikitext. Possibly dismantling this old system is tracked in T321217.