The htmlagilitypack does strip out <br> tags from the htmleditor extender. I am using the latest release. I have seen no posts that show a resolution for this. Has anyone resolved this or do I need to use a different sanitizer?
The htmleditor strips out the <br> tag. In firefox, chrome and safari this is critical as all line breaks are enterred as <br> and so none of the line breaks get saved to the database. Thanks.
Thanks for reply - Yes I have tried htmlencode and decode but it makes no difference as the sanitizer strips the html before you can save it to the database.
Thanks for reply - but effectively this means that the htmleditor extender is useless if it doesn't function in any browser other than IE.
http://stephenwalther.com states that the new santizer does not strip out <br /> tags so surely the ajax team must have got this to work with the sanitizer provided in the project - but I cannot (and it seems others
cannot to judging by other posts).
london24
Member
97 Points
108 Posts
Santizer problem with 2012 release of HtmlEditorExtender
Sep 13, 2012 06:28 PM|LINK
Hi
The htmlagilitypack does strip out <br> tags from the htmleditor extender. I am using the latest release. I have seen no posts that show a resolution for this. Has anyone resolved this or do I need to use a different sanitizer?
Thanks.
Song-Tian - ...
All-Star
43705 Points
4304 Posts
Microsoft
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 08:12 AM|LINK
Hi,
Please post the related code and valued info. And describe your question more details.
Feedback to us
Develop and promote your apps in Windows Store
london24
Member
97 Points
108 Posts
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 08:20 AM|LINK
<ajaxToolkit:HtmlEditorExtender ID="HtmlEditorExtender1" TargetControlID="txtArticle" runat="server" OnImageUploadComplete="MyHtmlEditorExtender_ImageUploadComplete" > <Toolbar> <ajaxToolkit:Undo /> <ajaxToolkit:Redo /> <ajaxToolkit:Bold /> <ajaxToolkit:Italic /> <ajaxToolkit:Underline /> <ajaxToolkit:StrikeThrough /> <ajaxToolkit:Subscript /> <ajaxToolkit:Superscript /> <ajaxToolkit:JustifyLeft /> <ajaxToolkit:JustifyCenter /> <ajaxToolkit:JustifyRight /> <ajaxToolkit:JustifyFull /> <ajaxToolkit:InsertOrderedList /> <ajaxToolkit:InsertUnorderedList /> <ajaxToolkit:HorizontalSeparator /> <ajaxToolkit:BackgroundColorSelector /> <ajaxToolkit:ForeColorSelector /> <ajaxToolkit:FontNameSelector /> <ajaxToolkit:FontSizeSelector /> <ajaxToolkit:Indent /> <ajaxToolkit:Outdent /> <ajaxToolkit:HorizontalSeparator /> <ajaxToolkit:InsertImage /> </Toolbar> </ajaxToolkit:HtmlEditorExtender>in webconfig:
<configSections> <sectionGroup name="system.web"> <section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" /> </sectionGroup> </configSections> in <system.web>: <sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider"> <providers> <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"></add> </providers> </sanitizer>Song-Tian - ...
All-Star
43705 Points
4304 Posts
Microsoft
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 08:24 AM|LINK
Hi,
Please describe your question more details.
Feedback to us
Develop and promote your apps in Windows Store
london24
Member
97 Points
108 Posts
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 08:40 AM|LINK
The htmleditor strips out the <br> tag. In firefox, chrome and safari this is critical as all line breaks are enterred as <br> and so none of the line breaks get saved to the database. Thanks.
Song-Tian - ...
All-Star
43705 Points
4304 Posts
Microsoft
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 08:45 AM|LINK
Hi,
Then do you try htmlencode before save, and htmldecode when reading.
Feedback to us
Develop and promote your apps in Windows Store
london24
Member
97 Points
108 Posts
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 09:03 AM|LINK
Thanks for reply - Yes I have tried htmlencode and decode but it makes no difference as the sanitizer strips the html before you can save it to the database.
Song-Tian - ...
All-Star
43705 Points
4304 Posts
Microsoft
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 10:16 AM|LINK
Hi,
Then I think you must change some HtmlEditorExtender source code to do that.
Feedback to us
Develop and promote your apps in Windows Store
london24
Member
97 Points
108 Posts
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 10:31 AM|LINK
Hi
Thanks for reply - but effectively this means that the htmleditor extender is useless if it doesn't function in any browser other than IE.
http://stephenwalther.com states that the new santizer does not strip out <br /> tags so surely the ajax team must have got this to work with the sanitizer provided in the project - but I cannot (and it seems others cannot to judging by other posts).
Song-Tian - ...
All-Star
43705 Points
4304 Posts
Microsoft
Re: Santizer problem with 2012 release of HtmlEditorExtender
Sep 14, 2012 10:33 AM|LINK
Hi,
You could report that at:
http://ajaxcontroltoolkit.codeplex.com/workitem/list/basic.
Feedback to us
Develop and promote your apps in Windows Store