Interface IXssWhitelist

All Known Implementing Classes:
NullXssWhitelist

public interface IXssWhitelist
Cross-site scripting (XSS) filter which uses a whitelist to sanitize potentially unsafe input.
Since:
9.9.7
Author:
Petru Galanton
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isValid(String input)
    Validates the provided input against this whitelist.
    Checks the provided input against this whitelist and returns the sanitized input.
  • Method Details

    • sanitize

      String sanitize(String input)
      Checks the provided input against this whitelist and returns the sanitized input.
      Parameters:
      input - the input to be checked
      Returns:
      the sanitized input
    • isValid

      boolean isValid(String input)
      Validates the provided input against this whitelist. Note that in most cases validation is not sufficient and sanitization should also be performed.
      Parameters:
      input - the input to be checked
      Returns:
      true if the input is valid, false otherwise.