Events and programs can be added by users regardless of the interface language. There could be events in any language under a single program, and content can be always mixed regardless of RTL/LTR interface support.
Users who look at the list of events in English may still see content in RTL. For example:
- The name of a single event may be in another language
- A category may be included that is from an RTL wiki
- Username may have RTL/LTR or a mix of characters
This means that content is being mangled even without starting to support the RTL in the interface itself. If any user inserts any of the above (category, username, or event/program name in RTL) the result may look broken:
(See the parentheses specifically)
Note: This will happen regardless of whether we intentionally support RTL for the interface, because users can insert any sort of text to their usernames, categories and event names. So this task is separate from whatever product decision is made for full RTL support.
Luckily, this is not too terrible to fix; we just need to wrap all user-controlled input with a bidirectional isolation (<bdi>...</bdi>) or in CSS (unicode-bidi: isolate;)
See https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi
Example:
English interface but the event name is in Hebrew with parentheses:
After wrapping with isolate tags (<bdi>{{ event.displayTitle }}</bdi>):
Possibly, we can create a twig helper method that wraps user-content with <bdi> tags, or add a class to all such cases to add the CSS override.