Last modified: 2013-10-21 10:17:20 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 T42258, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40258 - Deprecating and removing usage of RLE and LRE on MediaWiki
Deprecating and removing usage of RLE and LRE on MediaWiki
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks: 40486
  Show dependency treegraph
 
Reported: 2012-09-14 23:07 UTC by [no longer active user]
Modified: 2013-10-21 10:17 UTC (History)
3 users (show)

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


Attachments
LRM spotted on Special:Contributions (95.31 KB, image/png)
2012-09-14 23:07 UTC, [no longer active user]
Details

Description [no longer active user] 2012-09-14 23:07:59 UTC
Created attachment 11113 [details]
LRM spotted on Special:Contributions

Per http://www.w3.org/TR/its/#directionality we should avoid use of RLE and LRE (getDirMark()) and use html tags when is needed.

It is discussed why we should avoid direction control characters on http://www.w3.org/International/questions/qa-bidi-controls.en.php and http://www.w3.org/TR/html-bidi/

I think we must deprecate use of getDirMark() and getDirMarkEntity() on MediaWiki also.

Currently MediaWiki is using getDirMark() on these pages:
/includes/ChangesList.php
/includes/Linker.php
/includes/WikiPage.php
/includes/actions/HistoryAction.php
/includes/logging/LogPage.php
/includes/revisiondelete/RevisionDelete.php
/includes/specials/SpecialContributions.php
/includes/specials/SpecialDoubleRedirects.php
/includes/specials/SpecialListredirects.php
/includes/specials/SpecialNewpages.php
/includes/specials/SpecialProtectedpages.php
/includes/specials/SpecialShortpages.php
/includes/specials/SpecialWhatlinkshere.php
/includes/parser/Parser.php (is not critical)

And use of getDirMarkEntity() 
/includes/ImagePage.php
/includes/Skin.php

AFAICS it is easy/possible to remove these usages by replacing them with suitable HTML tags and CSS styles.

Attachment of this bug is a screenshot of Chrome (a new version, after https://bugs.webkit.org/show_bug.cgi?id=93888) that shows useless LREs.
Comment 1 Siebrand Mazeland 2013-07-09 12:40:39 UTC
Even though very recent browsers implement different ways of dealing with RTL/LTR, Wikimedia projects have a very large userbase with older and even out of support browsers. Removing these concepts from our codebase now, would mean that we introduce more problems for those users. I don't think this is the right thing to do right now. Maybe in a few years. We're conservative where it comes to backwards compatibility for browsers.
Comment 2 Amir E. Aharoni 2013-07-11 10:29:24 UTC
(In reply to comment #0)
> AFAICS it is easy/possible to remove these usages by replacing them with
> suitable HTML tags and CSS styles.

Not necessarily.

There are several issues here:

1. HTML5 gives more robust solutions for some of use cases of RLE, RLM etc., for example bidi isolation. We already use it here and there in MediaWiki code, for example in citation numbers As Siebrand says, however, this should be done gradually and carefully, and we shouldn't just drop support for browsers that don't implement these features.

2. In some cases, RLE/PDF is just a requirement. For example, it's impossible to define the direction of element tooltips (the title tag), and W3C actually recommends using RLE|LRE/PDF for this.

3. getDirMark can be replaced by getDirMarkEntity wherever possible. It should make it easier to debug, if nothing else.
Comment 3 [no longer active user] 2013-07-13 10:29:18 UTC
Totally agree use of lrm rlm in MediaWiki but using unicode-bidi per http://reference.sitepoint.com/css/unicode-bidi is supported in IE. "Internet Explorer for Windows versions up to and including 7 have some serious bugs relating to floated elements used in combination with the declarations direction: rtl; and unicode-bidi: embed;.". In fact I wanted a same this commit https://github.com/ebraminio/commafeed/commit/315d5705ccb37ab71b418357587b2a14b9f7c3b4 for MediaWiki. In fact using lrm and rlm and more buggier than using unicode-bidi: embed;
I found this bug https://crbug.com/152650 on MediaWiki recent changes:

just paste this in Chrome url to see what is my problem: data:text/html;charset=utf-8,%D8%A8‏.....%D8%A8
compare it with: data:text/html;charset=utf-8,%D8%A8.....%D8%A8
Comment 4 [no longer active user] 2013-07-13 10:52:30 UTC
*in MediaWiki -> in document.title
Comment 5 Amir E. Aharoni 2013-07-13 11:50:08 UTC
(In reply to comment #3)
> Totally agree use of lrm rlm in MediaWiki but using unicode-bidi per
> http://reference.sitepoint.com/css/unicode-bidi is supported in IE.

IE support unicode-bidi: embed, but not unicode-bidi: isolate. To test, see
https://en.wikipedia.org/wiki/User:Amire80/bidi-isolate

> "Internet
> Explorer for Windows versions up to and including 7 have some serious bugs
> relating to floated elements used in combination with the declarations
> direction: rtl; and unicode-bidi: embed;.". In fact I wanted a same this
> commit
> https://github.com/ebraminio/commafeed/commit/
> 315d5705ccb37ab71b418357587b2a14b9f7c3b4

I commented there.

> for MediaWiki. In fact using lrm and rlm and more buggier than using
> unicode-bidi: embed;
> I found this bug https://crbug.com/152650 on MediaWiki recent changes:
> 
> just paste this in Chrome url to see what is my problem:
> data:text/html;charset=utf-8,%D8%A8‏.....%D8%A8
> compare it with: data:text/html;charset=utf-8,%D8%A8.....%D8%A8

Both of them display the same result in Chrome and in Firefox: Ba, five does, Ba.
Comment 6 [no longer active user] 2013-07-13 12:20:58 UTC
(In reply to comment #5)
> IE support unicode-bidi: embed, but not unicode-bidi: isolate. To test, see
> https://en.wikipedia.org/wiki/User:Amire80/bidi-isolate

In fact I've did a patch locally http://fa.wikipedia.org/w/index.php?diff=10477876 against it, because it was making problem when you see you put rtl summary on ltr section title (like http://fa.wikipedia.org/w/index.php?title=%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%AF%DB%8C%D8%A7:%D9%86%D8%B8%D8%B1%D8%AE%D9%88%D8%A7%D9%87%DB%8C_%D8%AF%D8%B1%D8%A8%D8%A7%D8%B1%D9%87%D9%94_%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87_%D8%A7%D8%B2_%D9%82%D9%84%D9%85_%D8%AA%D9%88%DA%A9%D8%A7%D8%B1/%D9%BE%D8%B1%D8%B7%D8%B1%D9%81%D8%AF%D8%A7%D8%B1%D8%AA%D8%B1%DB%8C%D9%86_%D9%82%D9%84%D9%85%E2%80%8C%D9%87%D8%A7_%D8%A8%D8%B1%D8%A7%DB%8C_%D9%85%D8%B7%D8%A7%D9%84%D8%B9%D9%87_%D9%88%D8%A8&action=history Tahoma, Iranian sans, ..., put unicode-bidi: isolate there to see what will happen).

> I commented there.
That commit was in fact two commit, instead of just folding whitespaces before lrm, I removed ltr because with unicode-bidi: embed; was not needed. You shall test before comment there anyway

> Both of them display the same result in Chrome and in Firefox: Ba, five does,
> Ba.
Yes, test it on Windows
Comment 7 Amir E. Aharoni 2013-07-13 13:00:34 UTC
(In reply to comment #6)
> In fact I've did a patch locally
> http://fa.wikipedia.org/w/index.php?diff=10477876 against it, because it was
> making problem when you see you put rtl summary on ltr section title (like
> http://fa.wikipedia.org/w/index.

This is a bug that is worth reporting separately. Can you please report it?
Comment 8 [no longer active user] 2013-07-13 13:25:00 UTC
(In reply to comment #7)
> This is a bug that is worth reporting separately. Can you please report it?
Please file it I am not very optimistic about filing bug on wikimedia bugzilla (for example this bug was stale for one year). Also another interesting bug like is .blockExpiry { direction: ltr; } see http://fa.wikipedia.org/wiki/%D9%88%DB%8C%DA%98%D9%87:%D8%B3%DB%8C%D8%A7%D9%87%D9%87%E2%80%8C%D9%87%D8%A7/block <span class="blockExpiry" dir="ltr" title="1 day">۱ روز</span> is simply wrong . I just fixed that locally to prevent filing bug on wmf bugzilla
Comment 9 [no longer active user] 2013-07-13 13:31:07 UTC
Also see http://browsershots.org/http://tools.wmflabs.org/fatestwiki/crbug260102.html for Windows Chrome screenshots
Comment 10 [no longer active user] 2013-10-21 10:17:20 UTC
The related Chrome bug is fixed

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


Navigation
Links