New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Sanitizer that removes javascript: URI scheme from attributes to prevent XSS attacks

Definition

Namespace:Telerik.Web.UI.Editor.Content

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class JavaScriptUriSanitizer : IContentSanitizer

Inheritance: objectJavaScriptUriSanitizer

Implements: IContentSanitizer

Inherited Members object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public JavaScriptUriSanitizer()

Methods

Perform the sanitizing of the input content by removing javascript: URIs

C#
public string Sanitize(string input)
Parameters:inputstring

The input presumably containing javascript: URIs that would be stripped

Returns:

string

The sanitized content

Implements: IContentSanitizer.Sanitize(string)