Page MenuHomePhabricator

Strange directionality in some renameuser logs
Closed, DuplicatePublic

Description

https://test.wikipedia.org/wiki/Special:Log/renameuser

See this entry: 05:17, 12 October 2015 Steinsplitter (talk | contribs | block) renamed user درفش کاویانی (0 edits) to Darafsh (per request)

The درفش کاویانی (0 edits) portion should say (0 edits) instead of what it is saying now.

The previous rename log entry - 15:14, 9 October 2015 K6ka (talk | contribs | block) renamed user Войтович Роман Романович (0 edits) to DigitalRebel78 (per request)
...appears to be correct. It looks like the log is having trouble with usernames that use this lettering. Even pasting them into this form creates problems. It messes up the ability to delete words and letters that surround it, as well as add things (the carrot cursor jumps randomly, it seems). I think something similar may be happening with the logs too.

Event Timeline

Oshwah raised the priority of this task from to Low.
Oshwah updated the task description. (Show Details)
Oshwah added a project: MediaWiki-Logevents.
Oshwah subscribed.
Oshwah renamed this task from User Rename Log now has typos. to User Rename Log displays incorrectly when a user with foreign lettering is involved..Oct 12 2015, 9:39 PM
Oshwah set Security to None.
Oshwah removed a subscriber: Krenair.
Oshwah added a subscriber: Krenair.
Krenair renamed this task from User Rename Log displays incorrectly when a user with foreign lettering is involved. to Strange directionality in some user rights logs.Oct 12 2015, 9:39 PM
Krenair unsubscribed.
Krenair subscribed.

It's due to a mixed LTR/RTL languages in one string

Sorry, editing the entry undid some things that Krenair changed. Tried to fix, but didn't fix them all.

This might be a WONTFIX, unless there's some way we can put dir markers in the string easily...

I definitely agree with Krenair that this is probably due to two different LTR/RTL languages being inserted into the same string. Happened again with:

07:26, 2 October 2015 Steinsplitter (talk | contribs | block) renamed user دالبا (2 edits) to Dalba (Per :m:SRUC)

Umherirrender renamed this task from Strange directionality in some user rights logs to Strange directionality in some renameuser logs.Dec 22 2015, 8:33 PM

I think we can use Language::embedBidi() for this?

This only happens on Chrome. The parentheses auto-fixing part of the Unicode bidirectional algorithm is implemented in Firefox, but not in Chrome.

The solutions are:

  • Wait for Chrome developers to implement it
  • Isolate the username link with unicode-bidi: isolate in CSS or an HTML <bdi> tag.

Language::embedBidi() will probably work, but it uses control characters, which is less elegant than proper HTML or CSS.

The trouble with usernames is that it happens in a lot of other contexts, and this needs to be done every time. It would be nice to have a uniform solution for all usernames. Same for page titles... it's fun :)