Page MenuHomePhabricator

RTL in edit summary makes watchlist goes wild
Closed, ResolvedPublic

Description

When one putted an RTL mark in edit summary, my watchlist has gone wild, and is
at the moment unusable, I will send a sacreenshot of the problem.


Version: 1.9.x
Severity: major

Details

Reference
bz8996

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:34 PM
bzimport set Reference to bz8996.
bzimport added a subscriber: Unknown Object (MLST).

screenshot of the problem

Attached:

rtl.png (1×1 px, 641 KB)

This could be fixed by somehow detecting and surrounding right-to-left text with
‏ and ‎ (see "Internationalization Best Practices: Handling
Right-to-left Scripts in XHTML and HTML Content",
http://www.w3.org/International/geo/html-tech/tech-bidi.html). The same fix
could be applied to in-line text, which causes similar problems on left-to-right
pages.

The char that's mucking up here is a right-to-left override (U+202e).
This has effect to the end of the current paragraph in bidi layout.

Normally that would only be to the end of the current line in this sort of list
layout, but in enhanced recentchanges mode there's no block-level separation
between lines.

It might be possible to detect overrides and do a 'pop' or something appropriate
(more than the existing simple direction-poking chars), but a simple and
effective fix for the 'breaks the rest of the page' problem would probably be to
use <div>s appropriately in the enhanced RC layout.

suisui wrote:

proposed patch just a line put into a div

I've maked patch as Brion said,
just put a <div> and replace <br/> to </div>
need some CSS class??

Attached:

  • Bug 9011 has been marked as a duplicate of this bug. ***

I'll change the severity to critical, as is a malicious user exploits this bug,
it might make it impossible for some to revert said edit.

cannon.danielc wrote:

This seems to be fixed--though I'm not sure where or how it was fixed. In any case, on the experiments I've done on my testwikis have not presented this problem.

Problem still present.

Note that it effects enhanced RC mode, not the plain mode. Add U+202e to a comment block to see. :D

How about add &lrm; (&rlm; in RTL wikis) at the end of each comment parenthesis in the time of rendering?

So each comment will look like

(lorem ipsum emos idib txet&lrm;)

I made a JS script for myself which fixes enhanced RC this way and it works so I guess, it could be implemented on the server side.

ral315 wrote:

Any fixes for this should probably fix not only this bug, but the general RTL problem that occurs whenever a right-to-left script ends an edit summary (the next line's javascript arrow is unusable) See bug 7885 for details.

Closed as fixed per bug 7885.