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

Description

Page (correct) vs. TOC (incorrect)

BDI is an HTML 5 tag which tells the browser to isolate a section of bidirectional text.(http://www.w3schools.com/tags/tag_bdi.asp)

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 https://commons.wikimedia.org/w/index.php?oldid=138431886.

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


Version: unspecified
Severity: minor

Attached:

Page_v_TOC.png (93×258 px, 7 KB)

Details

Reference
bz72884

Event Timeline

bzimport raised the priority of this task from to Medium.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

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

The patch is merged. Is this fixed?

TheDJ claimed this task.