Item text messing up

Every time i set an item text containing a non alphanumeric value (example: . ! : *)

toolbar.setItemText("views","*User Defined");

The character in the string gets displayed at the END of the string!? i tried using html entity values instead, but it’s still the same result.

Using DHTMLX Suite Pro 3.5
Chrome / Win

Just use the symbol ‘’ before asterisk:

toolbar.setItemText("views","\*User Defined");

I narrowed the problem down. The position of characters in the name text only gets messed up when using a spacer to right-align items in the toolbar, like this:

toolbar.addText("start", 1, " ");
toolbar.addSpacer("start"); // Spacer cannot be added in XML, so we do it here								toolbar.loadXML("http://localhost:8080/core2/GridToolbar?cat=" + catalogId);

Afterwards all text strings in the toolbar (text items, button names, etc.) gets messed up when containing a non-alphanumeric character. Colon seems to be displayed in the beginning all the time, and * seems to be displayed at the end all the time!?

Thanks, but not even escaping the asterisk (or any other character) helps.

All the texts AFTER the spacer gets messed up.

toolbar.addText("start", 1, " colon\:");
toolbar.addSpacer("start"); // Spacer cannot be added in XML, so we do it here
toolbar.addText("start2", 2, " colon2\:");

produces the right HTML when viewed in object inspector in Chrome. It just shows the colon in FRONT of the “colon2” text!?


You can try the next css rule:

<style> .dhxtoolbar_spacer div{ direction:ltr } </style>
But it will be better, if you replace the dhtmlxToolbar.js file with the attached.
dhtmlxtoolbar.rar (16 KB)