Fix issue with displaced braces( )

This is a problem caused by switching a site from LTR to RTL and vice-versa. I’ve tested it as well, here is my output if I switch my site to RTL

<?php echo "I am (developer)"; ?>

renders

(I am (developer

This is normal behavior when you switch to a RTL language. The problem is, parentheses or simply () doesn’t have any direction. When only one ( is used as in this

<?php echo "I am (developer"; ?>

it output correctly as

I am (developer

When the second parentheses appear, then things go haywire. Because of no inhereted direction, the browser simply reverse direction of the second parentheses, in this case ), in runs into, and paste in right at the front of the sentence, this is what you see in you question

To correct that, you need to ‘tell’ the browser somehow about this direction issue in order to output the text in the correct order of characters. This is where the left-to-right mark (LRM) is used. For more on implementation, read here

It is used to set the way adjacent characters are grouped with respect to text direction.

The characters to use &lrm; or &#x200e;, so will do something like this

<?php echo "I am (developer)&lrm;"; ?> 

or

<?php echo "I am (developer)&#x200e;"; ?>

EDIT 1

It seems like from your link it might be caused in normal LTR. You then have to use the right-to-left mark (RLM). It uses the following: &rlm; or &#x200f;

So you will need to do the following

<?php echo "I am (developer)&rlm;"; ?> 

or

<?php echo "I am (developer)&#x200f;"; ?>

EDIT 2

Ifyou need to replace ) in your titles, you can use the the_title filter to get all instances and replace it with str-replace. This should go into functions.php

add_filter('the_title', function ($title) 
{
   return str_replace(')', ')&lrm;', $title);

}, PHP_INT_MAX );

Just test it using the opposite as well

add_filter('the_title', function ($title) 
{
   return str_replace(')', ')&rlm;', $title);

}, PHP_INT_MAX );

error code: 523