Last modified: 2011-05-15 05:47:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6039, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4039 - BiDI: please preserve dir="ltr" and dir="rtl" in TOC
BiDI: please preserve dir="ltr" and dir="rtl" in TOC
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low trivial with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
: 2405 (view as bug list)
Depends on:
Blocks: rtl
  Show dependency treegraph
Reported: 2005-11-20 20:56 UTC by lɛʁi לערי ריינהארט
Modified: 2011-05-15 05:47 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description lɛʁi לערי ריינהארט 2005-11-20 20:56:29 UTC
URL will follow

== ‪Hello!‬ ==
== <span dir="ltr" >Welcome!</span> ==

will generate the following TOC at a RTL type wiki:


Please compare the titles in the TOC and the section names!

1. the first is OK, "!" is at right end
2. the second is wrong; "!" should be at right end

regards reinhardt [[user:gangleri]]
Comment 1 lɛʁi לערי ריינהארט 2005-11-20 21:11:38 UTC
*** Bug 2405 has been marked as a duplicate of this bug. ***
Comment 2 lɛʁi לערי ריינהארט 2005-11-30 17:28:10 UTC
changed the subject

If you look at the generated code of the TOC at
[[wiktionary:yi:project:bugzilla/04039]] you will see:

<table id='toc' class='toc'>
<div id='toctitle'>
<li class='toclevel-1'><a href="#follow_the_links"><span
class="tocnumber">1</span> <span class="toctext">follow the links</span></a></li>
<li class='toclevel-1'><a href="#.E2.80.AAHello.21.E2.80.AC"><span
class="tocnumber">2</span> <span class="toctext">Hello!</span></a></li>

<li class='toclevel-1'><a href="#Welcome.21"><span class="tocnumber">3</span>
<span class="toctext">Welcome!</span></a></li>

the *actual* <span class="toctext">Welcome!</span> should preserve dir="ltr"
from the section title which is
== <span dir="ltr" >Welcome!</span> ==

Preserving dir="ltr" and dir="rtl" in TOC would be a much better solution as
using general punctuation characters.
See them at

best regards reinhardt [[user:gangleri]]
Comment 3 Brion Vibber 2005-11-30 21:55:38 UTC
... huh?

Closing INVALID, reopen if you can explain in comprehensible English.
Comment 4 lɛʁi לערי ריינהארט 2005-11-30 23:20:10 UTC

If you want to write a message to a contributor at [[ar:]], [[ur:]] and you know
that this contributor does not understand the content language (because he takes
care of InterLanguage links etc.) you probably will write in English.

These wiki's are RTL.

If you make a new section *typing*
== Welcome! ==
the build in BiDi mechanism of the browser will generate somthing that *looks*
like *!Welcome* both in the TOC and as the header of the section.

I tried varios variants:
a) *typing*
== !Welcome ==
which *displayes* both in the TOC and as the header of that section as *Welcome!*
This is a kind of workaround but is ugly.

b) I tried using general punctuation characters *typing*
== &#8234;Hello!&#8236 ==
Opticaly this is fine but the anchor contains the general punctuation characters:
This solution is not suitable.

c) I tried
== <span dir="ltr" >Welcome!</span> ==
Now the header of the section generates fine but what you *see* as header is
and is *not* the same as what is in the TOC

The request for this bug report.
What is generated at this moment for c) is

<li class='toclevel-1'><a href="#Welcome.21"><span class="tocnumber">3</span>
<span class="toctext">Welcome!</span></a></li>

You see that both *<span dir="ltr" >* and *</span>* is "filtered".

What should be generated is

<li class='toclevel-1'><a href="#Welcome.21"><span class="tocnumber">3</span>
<span class="toctext"><span dir="ltr" >Welcome!</span></span></a></li>

I mean that *toctext* should preserve whatever was in the header. Please do
*not* concatenate / do not use <span class="toctext" dir="ltr" > because other
examples could use nested span dir="foo".

best regards reinhardt [[user:gangleri]]
Comment 5 lɛʁi לערי ריינהארט 2006-02-14 13:01:38 UTC
you will experience
Bug 4987: The "autocomment" link differs from the TOC link if <font ... /> or
<font ...> ... </font> is used.
Comment 6 Amir E. Aharoni 2011-05-15 05:47:57 UTC
This is not a MediaWiki bug, but a part of a family of feature requests to make true BiDi editing easier. Currently it can be solved by inserting LRMs in the right places. Common people don't like it, but there's nothing better.

The right thing to do to solve this on talk pages is to have ace RTL support on LiquidThreads (Bug 20934).

Note You need to log in before you can comment on or make changes to this bug.