Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

The Language Editor is destroying HTML entities in several strings

Discussion in 'General Discussion' started by Kent Brockman, Apr 4, 2009.

  1. Kent Brockman

    Kent Brockman Well-Known Member

    Jan 20, 2008
    Likes Received:
    Trophy Points:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    There are some strings that have hyperlinks or images, and when you translate them to your language, by some reason, the system is not saving correctly the texts.

    Let's see an example. Taking the variable subDesc5, when editing the Spanish lang pack for X3. Originally, you get something like this from the source code:

    <tr class="row-odd"><td>subDesc5</td><td><span class="langbox" id="langkey-subDesc5" onClick="el(this);"> [I]are relative to your account&amp;#39;s home directory. The [B]&lt;[/B]img align=[B]&quot;[/B]absmiddle[B]&quot;[/B] src=[B]&quot;[/B]../images/homeb.gif[B]&quot;&gt;[/B] icon signifies your home directory which is [/I]</span></td><td><a class="create-button" onClick="rv('subDesc5');">Revert</a><a class="create-button" onClick="re('subDesc5');">English</a></td></tr>
    the html special chars are correctly parsed by your browser, but when you type your version, the quotation marks are incorrectly translated/decoded every time you open the editor and save. Thus, the text displayed to the end user will be truncated like this:

     are relative to your account's home directory. The 
    As you can see, the string couldn't be parsed because of the string being incorrectly handled. I think this is due to a lack of a php-like htmlentities/unhtmlentities before saving and before displaying, respectively

    I have discovered that this fault have destroyed all the translations I did for the strings containing HTML tags like A and IMG.

    I hope this can be fixed. Regards!
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice