# Rtl direction is broken in quotes

**URL:** https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639
**Category:** Bug
**Created:** [February 9, 2022, 10:15am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639 "2022-02-09T10:15:01Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [February 9, 2022, 10:15am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/1 "2022-02-09T10:15:01Z")

</div>

I have a forum in rtl language. Recently quotes show text in ltr direction instead of rtl.

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/e/aec689f1e907c64883341ae2e3c1e3e55eaf6c79.png)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 9, 2022, 11:32am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/2 "2022-02-09T11:32:35Z")

</div>

Are you on latest Discourse? I can’t reproduce it locally when switching my locale to Arabic, for example.

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [February 9, 2022, 1:40pm UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/3 "2022-02-09T13:40:14Z")

</div>

I updated to latest just now. It didn’t fix the problem.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 9, 2022, 3:41pm UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/4 "2022-02-09T15:41:13Z")

</div>

Does this happen on multiple posts, or just that specific one? Have you also tried in [safe mode](https://meta.discourse.org/t/53504?silent=true)?

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [February 10, 2022, 6:44am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/5 "2022-02-10T06:44:53Z")

</div>

Yes it happens in multiple posts. And it also happens in [safe mode](https://meta.discourse.org/t/53504?silent=true).

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 10, 2022, 7:58am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/6 "2022-02-10T07:58:52Z")

</div>

Can you post a link to your site so we can have a look?

---

<div class="post-metadata">

### Author: ![hnaseri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hnaseri/32/120660_2.png) [@hnaseri](https://meta.discourse.org/u/hnaseri)
#### Post date: [February 10, 2022, 8:26am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/7 "2022-02-10T08:26:46Z")

</div>

here you are:

> **[انتشار آزمایشی نسخه ۸.۱۰ نرم افزار زبانشناس](https://talk.zabanshenas.com/t/topic/62854/19?u=hnaseri)**
>
> نسختون رو آپدیت نکردین. همون نسخه قبلی هست. لینک دانلود آپدیت جدید رو همون پست اول گذاشتم. احتمالا شما از طریق لینک نمیتونین آپدیت کنین. باید صبر کنین توی گوگل یا بازار منتشر بشه.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 10, 2022, 9:40am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/8 "2022-02-10T09:40:23Z")

</div>

Thanks, from looking at the source code, the quotes there have a `dir="ltr"` attribute. I’m guessing you have enabled the setting `mixed text direction`. In fact, I can reproduce your issue when I enable that setting locally.

I’m not sure whether this is “working as designed” or whether there is a small/big bug here. @Osama are you familiar with this part of the app?

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [February 10, 2022, 9:48am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/9 "2022-02-10T09:48:49Z")

</div>

It certainly feels like we have a bug here. I’d expect the quote direction to match the site direction. I’ll dig in and see what’s causing this!

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [February 20, 2022, 8:07pm UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/11 "2022-02-20T20:07:10Z")

</div>

> [@hnaseri](#):
>
> Recently quotes show text in ltr direction instead of rtl.

After looking into this, I’m a little bit confused, are you sure this used to render correctly? Because I couldn’t see anything in the code for handling quoted RTL text with a username in a LTR language. I also tried a Discourse version from more than a year ago and the quote didn’t render correctly either.

Anyways, here is a PR for handling this correctly:

[https://github.com/discourse/discourse/pull/16004](https://github.com/discourse/discourse/pull/16004)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [February 28, 2022, 7:00am UTC](https://meta.discourse.org/t/rtl-direction-is-broken-in-quotes/217639/12 "2022-02-28T07:00:06Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
