Skip to content

[Bug]: Channel display name in RTL script (eg. Arabic, Hebrew) mutilates the data row #8364

@5891

Description

@5891

Guidelines

Describe the bug

Either the number of the view count moves to the beginning of the data row (the row of the channel display name, view count and date of upload for each video), or the channel display name moves to the immediate left of the word "views", or the dot immediately after the channel display name moves to the beginning of the data row

Image

Expected Behavior

None of those happens

Issue Labels

visual bug

FreeTube Version

v0.23.12 Beta

Operating System Version

Windows 10 version 22H2

Installation Method

Portable

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

This is exactly what's happening: https://www.w3.org/International/articles/inline-bidi-markup/uba-basics#isolation

Fix???: https://www.w3.org/International/questions/qa-html-dir#dirauto

Useful channel display names to search to test it yourself (disclaimer: just the first things that came up to my mind, and I don't know how to fix this particular direction issue here):

  • כאן
  • הארץ
  • ידיעות אחרונות
Trivial or not??? HTML to reproduce and compare the exoteric methods to fix it:
<!doctype html>
<meta charset="utf-8">
<title>bidi test</title>

<style>
.title { font-style: italic; }
</style>

<p class="title">no support (same as <a href="https://www.w3.org/International/articles/inline-bidi-markup/uba-basics#isolation">this</a> exactly)

<p>Haaretz הארץ • 1,221 views • 1 week ago
<br>ידיעות אחרונות • 484 views • 3 years ago

<p class="title">lrm unicode character only (an invisible character will slip into the clipboard)

<p>Haaretz הארץ‎ • 1,221 views • 1 week ago
<br>ידיעות אחרונות‎ • 484 views • 3 years ago

<p class="title">lrm entity reference only (same)

<p>Haaretz הארץ&lrm; • 1,221 views • 1 week ago
<br>ידיעות אחרונות&lrm; • 484 views • 3 years ago

<p class="title">dir=&quot;auto&quot markup; no lrm

<p><span dir="auto">Haaretz הארץ</span> • 1,221 views • 1 week ago
<br><span dir="auto">ידיעות אחרונות</span> • 484 views • 3 years ago

<p class="title">&lt;bdi&gt; markup; no lrm

<p><bdi>Haaretz הארץ</bdi> • 1,221 views • 1 week ago
<br><bdi>ידיעות אחרונות</bdi> • 484 views • 3 years ago

<p class="title">none of these breaks ltr

<p>ynet • 270 views • 2 years ago
<br>ynet‎ • 270 views • 2 years ago
<br>ynet&lrm; • 270 views • 2 years ago
<br><span dir="auto">ynet</span> • 270 views • 2 years ago
<br><bdi>ynet</bdi> • 270 views • 2 years ago

<p class="title">dir=&quot;ltr&quot markup; no lrm

<p><span dir="ltr">Haaretz הארץ</span> • 1,221 views • 1 week ago
<br><span dir="ltr">ידיעות אחרונות</span> • 484 views • 3 years ago

Edit: seems working?

Image

What if using dir="auto" instead of dir="ltr" or anything at that leads to some esoteric security issues later down the road, though? Too much to think for me, regrettably.

And what if it introduces an analogous bug for RTL-locale users?

Nightly Build

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To assign

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions