Html |
Note: This API is now obsolete.
[ObsoleteAttribute("This is an incomplete solution for protecting against Cross-Site Scripting (XSS) attacks and should not be relied upon as a comprehensive security measure. For robust XSS protection, it is strongly recommended that applications pass the HTML output through a dedicated HTML sanitizer library that is actively maintained and updated to address emerging security threats.")] public bool FilterHtml { get; set; }
Gets or sets whether undesirable tags should be stripped from the output.
This is an incomplete solution for protecting against Cross-Site Scripting (XSS) attacks and should not be relied upon as a comprehensive security measure. This filter only removes certain known dangerous or undesirable HTML tags (such as <applet>, <audio>, <base>, <dialog>, <embed>, <form>, <frame>, <frameset>, <iframe>, <input>, <link>, <object>, <script>, <select>, <source>, <style>, <textarea>, <video>, and any tags without an enum mapping) but does not:
For robust XSS protection, it is strongly recommended that applications pass the HTML output through a dedicated HTML sanitizer library (such as HtmlSanitizer, Ganss.XSS, or similar) that is actively maintained and updated to address emerging security threats. |