This is a migrated thread and some comments may be shown as answers.

[Solved] Node text enclosed in <>

3 Answers 82 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Amit Rahul
Top achievements
Rank 1
Amit Rahul asked on 26 Mar 2008, 10:25 PM
We came across this issue while testing the tree view control. We have developed a composite control that uses RadTreeView with editing allowed for node names. If we set the node text to a string enclosed in <> the tree doesnt render anything at all. Rather it just shows an empty text node. RadTreeView control should rather HTML encode the node texts before rendering. 

In fact we saw the same issue on the Telerik's demo site http://www.telerik.com/demos/aspnet/prometheus/TreeView/Examples/Functionality/NodeEditing/DefaultCS.aspx as well. Please do let us know if Telerik plans on fixing this anytime soon.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Amit Rahul
Top achievements
Rank 1
answered on 27 Mar 2008, 01:35 AM
To add to this: For our project, we are now using Server.HtmlEncode for all the texts for Tree Control elements and this seemed to have solved this issue for us. But I still think RadTreeView should also HTML encode its texts.

Thanks!
0
Atanas Korchev
Telerik team
answered on 27 Mar 2008, 10:57 AM
Hello Amit Rahul,

We do not encode the Text of the tree nodes because some of our customers use it to render custom html. Encoding it would just display the html tags not their visual representation. I think encoding the Text programmatically is a viable workaround which will support both scenarios. I hope this is not a showstopper for you.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Amit Rahul
Top achievements
Rank 1
answered on 27 Mar 2008, 06:17 PM
Albert, Thanks for your quick response. Since we are going ahead with our own encoding of tree view texts so its not a show stopper for us.

Thanks!
Amit
Tags
TreeView
Asked by
Amit Rahul
Top achievements
Rank 1
Answers by
Amit Rahul
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or