Page MenuHomePhabricator

Legacy parser generates different output on RTL wikis for left/right aligned images compared to LTR wkis but Parsoid does not
Closed, ResolvedPublic

Description

Check output of this on ar.wikipedia.org and en.wikipedia.org

[[File:Hawk moth caterpillar.jpg|thumb|250px|Right|Hippotion celerio]]

On en.wikipedia.org, the legacy parser HTML looks like :<div class="thumb tright" ..> ... </div>
On ar.wikipedia.org, the legacy parser HTML looks like :<div class="thumb tleft" ..> ... </div>

But, Parsoid generates <figure class="mw-halign-right" ..>...</figure> in both cases.

Should Parsoid flip the left/right orientation in the HTML or should the CSS for the classes be transformed via CSSJanus? Right now, neither of this happens and causes pretty significant rendering diffs (which shows up in visual diff testing).

Event Timeline

Wait, maybe this isn't a dupe, since there's an explicit "right"

Oh, hmm, this is silly. Media options are supposed to be case sensitive but it doesn't look like Parsoid is. It probably was at some point, seeing T259165. I wonder what happened ...

Change 714145 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] [WIP] Media options are case sensitive

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

Arlolra triaged this task as Medium priority.Aug 20 2021, 11:32 PM

Change 714145 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Make magic words case-sensitive

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

Change 715581 had a related patch set uploaded (by Sbailey; author: Sbailey):

[mediawiki/vendor@master] Bump parsoid to 0.14.0.a17

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

Change 715581 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.14.0-a17

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