Rtl direction is broken in quotes

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

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

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

Does this happen on multiple posts, or just that specific one? Have you also tried in safe mode?

1 Like

Yes it happens in multiple posts. And it also happens in safe mode.

1 Like

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

here you are:

1 Like

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?

3 Likes

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!

4 Likes

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:

5 Likes

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