When creating a Help Center with multiple languages you may find that in some cases you will need to use directional attribute tags in your HTML to specify how the language is processed by the page. For example, Arabic and Hebrew are read right-to-left unlike many Latin and Germanic language bases.
The addition of the these tags is relatively simple and the syntax is as follows:
<element dir="ltr | rtl | auto">
However when inputting this into the Article source code for a pre-built Help Center theme, you will find that the tags do not work and the text direction will still default to left-to-right
- You will need to have a language text that is supposed to be read right-to-left. See Configuring your Help Center to support multiple languages for more information.
- You will need to have correctly input these tags via your Article source code editor in the top bar of your Article edit page. See See our article on Customizing theme HTML.
By default, the Help Center quarantines unsafe HTML tags and attributes in pages to reduce the risk of somebody introducing malicious code (read more on allowing unsafe content in Customizing your Help Center). In this case the "dir" tag is not included in our list of safe tags, so it is therefore stripped out of the HTML.
The fix to allow your tags to display correctly is to allow unsafe HMTL within your Help Center. On its own this should not cause any undue safety concerns, however, it is important to note that making this change will allow potentially malicious code to be executed when users open a page in a browser.
It is also important to note that these changes can be made directly to your Theme without having to allow this "unsafe" content on your Help Center as a whole. Adjusting the HTML of your Help Center at the theme level will bypass the unsafe content restrictions which only affect Article content. For more information on adjusting this code please check out our Article on Customizing your Help Center theme.