Page MenuHomePhabricator

Table of contents doesn't account for HTML <bdi> tags
Closed, ResolvedPublic


Page (correct) vs. TOC (incorrect)

BDI is an HTML 5 tag which tells the browser to isolate a section of bidirectional text.(

Wikimedia correctly renders BDI tags, but it ignores them when generating the table of contents for a page.

For the following wikitext:

<bdi>[[User:مسعود بوکانی|مسعود بوکانی]]</bdi> (28 edits)

... the TOC renders the HTML as:
<span class="tocnumber">2.76</span> <span class="toctext">مسعود بوکانی (28 edits)</span>

.... the page renders the HTML as:
<bdi><a href="/wiki/User:%D9%85%D8%B3%D8%B9%D9%88%D8%AF_%D8%A8%D9%88%DA%A9%D8%A7%D9%86%DB%8C" title="User:مسعود بوکانی">مسعود بوکانی</a></bdi>

You can view this in action at

I've attached screenshots for Chrome (one of the browsers which supports the tag).

Version: unspecified
Severity: minor




Event Timeline

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

gerritadmin wrote:

Change 170589 had a related patch set uploaded by TheDJ:
Parser: Add <bdi> to the whitelist for TOC links

Restricted Application added a project: I18n. · View Herald TranscriptJun 2 2015, 2:20 PM

The patch is merged. Is this fixed?

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 16 2015, 3:26 PM
Amire80 moved this task from Backlog to MediaWiki-core on the RTL board.Jul 16 2015, 3:27 PM
TheDJ closed this task as Resolved.Jul 16 2015, 5:14 PM
TheDJ claimed this task.