Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by dblv on Apr 08, 2009 03:46
open dhtmlx forum
Single quote in treeview

I am using DhtmlXTree and have a big problem with text attribute of item when my string contains a single quote.

I tried to convert it with rawurlencode (php) but it's not unescaped in the treeview.

How can i do ?

(excuse my bad english, i'm a poor french !)
Answer posted by Alex (support) on Apr 08, 2009 06:40

Hello, 

Please, check that xml, which generated by your script, is correct. The example of correct xml:

...

<item text="some ' text" ....></item>

...

In this case, as I use double quotes for attributes, a single quote can be put inside text attribute.

Answer posted by dblv on Apr 08, 2009 08:03

Oups I made a mistake !

It's not the single quote but the french character é

I succeeded by formating text with rawurlencode and add unescape function in dhtmlxtree.js