1

Closed

Sanitizer.GetSafeHtml and Sanitizer.GetSafeHtmlFragment retrun invalid html !

description

Suppose "<form><span>hello</span></form>" as input string, Sanitizer.GetSafeHtml returns "<html><head><form></head><body><span>hello</span></form></body></html>" and Sanitizer.GetSafeHtmlFragment returns "<form><div><span>hello</span></form></div>", which both are invalid html!
Closed Oct 29, 2011 at 2:59 PM by bdorrans

comments

bdorrans wrote Oct 29, 2011 at 2:59 PM

Actually no - that's perfectly fine HTML, it's just not valid XHTML - and that's by design, as the code was never meant be an XHTML parser.