How to whitelist br tag in, C#, website using HAP to sanitize

Topics: Developer Forum, User Forum
Dec 3, 2013 at 4:53 PM
I've searched all over and can't find a solution to this.

I have a website with a textbox and the ajax htmleditorextender attached to this textbox. The htmleditorextender uses the html agility pack to sanitize the textbox. It looks like HAP is removing the <br> tags that mozilla inputs when the user tries to create line breaks by pressing the enter keyboard key. Other browsers create div's upon enter key so all works well with other browsers.

My question is, is it possible to add the br tag that mozilla creates to the current HAP whitelist so that it is not removed? If not, are there other workarounds like replacing the br tags before the HAP begins sanitizing?

If you can help please be as detailed as possible, including actual usable code and directions as to where or in what file to put the code. I appreciate the help very much! Thanks!