Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: How to whitelist br tag in asp.net, C#, website using HAP to sanitize

$
0
0
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!

Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>