Search code examples
c#htmlvalidationrepair

HTML validation/fix in C#


I need to check if a HTML document is correct, if all tags and attributes are ok (in C#). If not, try to fix malformed tags and/or attributes. Any suggestions for a library or tool that i can use?

Thanks.


Solution

  • Tidy Managed solved my problems. This tool knows to repair broken tags and to close tags. Build TidyManaged app and download the libtidy.dll file and place it in bin/debug file.