I'm using AjaxToolkit:HtmlEditorExtender to open edit XML files in my asp.net application, and have come across an issue where my xml nodes are not showing up in my document specifically the ones that begin the node like "< t h i n g s >" or "< s t u f f "
Asked
Active
Viewed 79 times
0
-
the quoted stuff got removed it was "< t h i n g s >" and "< s t u f f". both with no spaces. – Jerry Daru Sep 28 '16 at 20:30
-
Here's where I stand now. I have a HtmlEditorExtender control that looks like this: – Jerry Daru Oct 04 '16 at 18:39
-
Here's where I stand now. I have a HtmlEditorExtender control that looks like this: ajaxToolkit:HtmlEditorExtender ID="editorExtender" TargetControlID="txtEditor" DisplaySourceTab="true" runat="server" I've added to my web.config a configSection for system.web sanitizer and the sanitizer section that points to HtmlAgilityPack dll as the provider. and this entry for the ajaxControlToolkit ajaxControlToolkit useStaticResources="true" htmlSanitizer="AjaxControlToolkit.HtmlEditor.Sanitizer.DefaultHtmlSanitizer, AjaxControlToolkit.HtmlEditor.Sanitizer"/> still same result – Jerry Daru Oct 04 '16 at 18:47
1 Answers
1
HtmlEditorExtender uses a Sanitizer by default that removes nodes that are not in a white list. This is expected behavior, because HtmlEditorExtender and Sanitizer are designed for HTML, not XML.
You can disable sanitization by setting EnableSanitization
property to false
and try to edit XML files.

MikhailTymchukDX
- 702
- 4
- 9
-
Thanks for the reply @MikhailTymchukDX, Tried that, EnableSanitization currently causes a Parser error, stating that it is not a public property of the HtmlEditorExtender. – Jerry Daru Sep 30 '16 at 17:16
-
That's strange. The code obviously shows it is a public property: https://github.com/DevExpress/AjaxControlToolkit/blob/master/AjaxControlToolkit/HtmlEditorExtender/HtmlEditorExtender.cs#L147 – MikhailTymchukDX Oct 03 '16 at 08:17
-
Turns out I was having an issue updating my version of AjaxControlToolkit. The project used to run with version 4.1.something, and when I updated to version 16.1.1.0 the .dll file in my projects bin folder was not replaced. I am still having issues getting the sanitizer to work. Now though it doesn't build at all :( – Jerry Daru Oct 04 '16 at 18:31
-
Did you follow [upgrading guide](https://github.com/DevExpress/AjaxControlToolkit/wiki/Upgrading-from-v7.x-and-below)? – MikhailTymchukDX Oct 05 '16 at 15:31