smartDBforms.NET API Reference

HTMLStripper Members

HTMLStripper overview

Public Static (Shared) Methods

Strip Removes the potential dangerous tags and keywords from the sourceHTML and returns the result. In this way Javascript injection attack can be avoided. IMPORTANT: Although this method will prevent most of the Javascript injection attacks it is not always 100% sure that all Javascript injection attack can be prevented. Additionally the html can be html encoded. For html encoding only the following items are transformed: > to &gt;, < to &lt;, & to &amp;. The following potentially dangerous tags and keywords are transformed.
Dangerous ItemConverted to
SCRIPT blockThe whole script block is deleted
IFRAME, STYLE, LINK tags and blocksThe items are deleted
javascript keyword. For example - "javascript:"javascript is transformed to javascript_
Event handler property. For example: onclick=Underscore is added to the event name. For examle: onclick= is transformed to onclick_=

Public Instance Constructors

HTMLStripper Constructor Initializes a new instance of the HTMLStripper class.

See Also

HTMLStripper Class | Adillis.SmartDBForms.Tools Namespace