Live Chat Here!
Characters to avoid in the Multilingual Translations list
Posted by Martin Laplante on 10 February 2016 01:32 PM

The most troublesome character to watch for in the multilingual translations list is the single quote. The simplest solution is to use a different character for an apostrophe in the Multilingual Translations list. Rather than using the typewriter apostrophe(U+0027), you can use the more correct typographic apostrophe, U+2019, or the easier-to-enter alternative, the ASCII grave accent ( ` ) U+0060 . Similarly for double quotes, use curved quotation marks or French guillemets

Other characters that may break page rendering when they are inserted into the wrong place in Javascript are newline characters, quotes, and backslash. Although PointFire attempts to escape them properly, there are lots of Javascript contexts where double or triple escaping is necessary or html entity escaping rather than Javascript special character escaping.

In general, you shouldn't have to worry about characters, PointFire should handle the correct escaping within Javascript. However, if you have seen SharePoint's Javascript you know that sometimes means double or triple escaping of special characters. Since JS and HTML escape characters differently, it is tricky to enter pre-escaped strings in the translations list; PointFire makes no difference between strings that will be rendered by html and strings that will be rendered in Javascript. Pre-escaped strings will work in one context but not the other. Characters that have special meaning in html parsing, like <, >, and &, will be escaped automatically. That means that attempts to insert them into strings in the Multilingual Translations list, hoping for the html to be parsed, will not work. Changing the value of PFEscapeHandling will change the way this escaping is done, if required.

Single and double quotes and newlines are the most troublesome, they can cause rendering errors rather than simply displaying incorrectly. Newlines are disallowed by default but can exist if the column type is changed from single line to multiple lines or when importing. There are some contexts (including view names and page titles) where strings can be inserted into regular expressions, and unexpected results may occur where a string includes regular expression metacharacters \, ^, $, |, ?, *, +, (, ), [, ], {, }. In particular, invalid metacharacter expressions like \s cause errors. This is only an issue in PointFire 2013 when PFPerf=0, and it was an issue in PointFire 2010.


(1 vote(s))
This article was helpful
This article was not helpful

Comments (0)
IceFire Home | Support Center | PointFire Home
© Copyright IceFire Studios Corp. 2019 - All Rights Reserved.