Package org.apache.sling.testing.mock.sling

# Class MockXSSFilter

java.lang.Object
org.apache.sling.testing.mock.sling.MockXSSFilter

All Implemented Interfaces:
  `org.apache.sling.xss.XSSFilter`

public final class MockXSSFilter extends Object implements org.apache.sling.xss.XSSFilter
Mock implementation of `XSSFilter` that just accepts anything.

## Field Summary

### Fields inherited from interface org.apache.sling.xss.XSSFilter

`DEFAULT_CONTEXT`

## Constructor Summary

Constructors
Constructor
Description
`MockXSSFilter()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`check(org.apache.sling.xss.ProtectionContext context, String src)`
`String`
`filter(String src)`
`String`
`filter(org.apache.sling.xss.ProtectionContext context, String src)`
`boolean`
`isValidHref(String url)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockXSSFilter

public MockXSSFilter()

## Method Details

### check

public boolean check(org.apache.sling.xss.ProtectionContext context, String src)

Specified by:
  `check` in interface `org.apache.sling.xss.XSSFilter`

### filter

public String filter(String src)

Specified by:
  `filter` in interface `org.apache.sling.xss.XSSFilter`

### filter

public String filter(org.apache.sling.xss.ProtectionContext context, String src)

Specified by:
  `filter` in interface `org.apache.sling.xss.XSSFilter`

### isValidHref

public boolean isValidHref(String url)

Specified by:
  `isValidHref` in interface `org.apache.sling.xss.XSSFilter`