tags:

views:

301

answers:

4

I'm looking for a html sanitizer which I can call per API to sanitise strings which I get from my webapp. Are there some useful easy to use libs available? Does anyone knows maybe one or two?

I don't need something big it just must be able to find unclosed tags and close them.

+4  A: 

JTidy may help you.

Jerome
Yes idd, jTidy help me out here. Thanks for sharing.
asrijaal
+2  A: 

Apart from JTidy you can also take a look at:
Nekohtml
TagSoup
Getting text in HTmL document

Samuh
A: 

Hi i'm trying to use roberto's script (c# version)

HtmlSanitizer.sanitize(mystring)

but I get this error: System.ArgumentOutOfRangeException: Index e length

Descend