brackets displays wrongly for right to left display style
You just need to add the LRM character after the last bracket. HTML entity: ‎
<html dir="rtl"><body><p>hello (world)‎</p></body></html>
This tells the browser to interpret the brackets as left-to-right reading.
Adding the special rlm character in css before and after your element solved all cases I've come across in Firefox and Chrome:
*:after { content: "\200E";}*:before { content: "\200E";}