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

RadHtmlField in DataView webpart

1 Answer 64 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 Jul 2009, 05:26 PM
Hello,

I am using the RadEditor is a Publishing Pages scenario and it workd beutifully. However, when I use a Dataview webpart to trieve field content entered with the "AllowSpecialTags" attribute enabled The page renders the following markup;

<pre style="display:none" id=RadEditorEncodedTag>PGVtYmVkIHNyYz0iaHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1M4YkxqSU1YM2JFJmFtcDtobD1lbiZhbXA7ZnM9MSZhbXA7IiB3aWR0aD0iMzIwIiBoZWlnaHQ9IjI2MCIgdHlwZT0iYXBwbGljYXRpb24veC1zaG9ja3dhdmUtZmxhc2giIGFsbG93c2NyaXB0YWNjZXNzPSJhbHdheXMiIGFsbG93ZnVsbHNjcmVlbj0idHJ1ZSIgLz4 

I realize this markeup must be encoded somehow so that SharPoint will not strip out special tags, attributes, and scripts. So is there a way, using a dataview webpart, to display the content entered using the RadEditor control?

Thank you in advance, any help is appreciated.

1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 30 Jul 2009, 11:37 AM
Hello David,

When you set the AllowSpecialTags property the RadEditor encodes the content by using these <pre> tags. Afterwards the content is decoded just before to be shown on the page.

In order to decode the content of the RadEditor you need to use the following static method.
Telerik.SharePoint.EditorTools.UnEscapeSpecialTags(string)

I hope this helps.


Kind regards,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
WebParts for SharePoint
Asked by
David
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or