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

& becomes & on renaming

4 Answers 55 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mallverkstan
Top achievements
Rank 2
Mallverkstan asked on 09 Jan 2009, 01:18 PM
(the header should say "& becomes & on renaming")

Possibly related to: http://www.telerik.com/community/forums/aspnet-ajax/treeview/changing-node-name-to-contain-an-ampersand.aspx

I'm running the lastest build (a recent nightly build even).

function ClientNodeEditing(sender, eventArgs)  {
var new_text = eventArgs.get_newText() ;
}
if the new text is "a&b", new_text becomes "a&b".

Regards,
Mallverkstan

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Jan 2009, 12:57 PM
Hi Mallverkstan,

We have reproduced this behavior and admit that this is a bug. The good news is that our developers have fixed it. The fix will be incorporated in the next internal build. Also we plan to release SP2 officially in the middle of the next week. If this bug is a showstopper for you please open a support ticket and we will send you a private hotfix.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mallverkstan
Top achievements
Rank 2
answered on 12 Jan 2009, 10:20 AM
Thank you for a swift reply.

The bug is not that crucial for me right now, but I need to ensure that my product works as expected in the end. I have modified my code so that the & sign is correctly displayed and currently this is working as it should when I set the node text, so as far as I'm concerned you need not correct it. :-)  Perhaps it is even a good thing that the & sign is turned into &amp?

When I tested for my last post, it was only the & sign that became wrong and not the < sign, but I am confused what exactly happens -- I have an async webservice that I call from my script, and from the webservice a dll that converts all & signs to &amp, and < to &lt, and so on, to make it valid xml. The new name is then returned to a callback function in the javascript. So you see why it is difficult for me to pinpoint exactly where the html entity conversion goes wrong, when it goes wrong.

The only thing that doesn't work right now is when a node is set to edit mode. Scenario:
* I rename a node to these four keys: &lt; . This works as expected
* I then set the node in edit mode. It is now shown as the sign < . This is wrong
* I press enter to save. The node has changed its name to <

I would like to know if this happens because of the same bug as in my first post, or because of my webservice? Should I restore my code to how it was before and wait for your service pack? Or is there some other way I have to change my code to make it work?

Thanks and best regards
Fredrik,
Mallverkstan
0
Accepted
Atanas Korchev
Telerik team
answered on 12 Jan 2009, 10:24 AM
Hi Mallverkstan,

RadTreeView should convert all special symbols (&, <>) to their proper html equivalents by itself. The bug with the ampersand was that the get_newText() was returning encoded output where it should return the plain text ( < instead of &lt; etc).

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mallverkstan
Top achievements
Rank 2
answered on 14 Jan 2009, 01:46 PM
Okay, thanks.
Tags
TreeView
Asked by
Mallverkstan
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Mallverkstan
Top achievements
Rank 2
Share this question
or