Class XSSHelper


  • public class XSSHelper
    extends Object
    Utility class for creating XSSUtil-instances.
    Author:
    Matthias Müller
    • Constructor Detail

      • XSSHelper

        public XSSHelper()
    • Method Detail

      • getXssUtil

        public static XSSUtil getXssUtil​(Properties platformProps,
                                         String... exceptions)
        Creates and returns a XSSUtil.
        If the boolean property xssProtect of the given Properties is true, a new XSSUtil is being created. The list-type property xssAllowedTags can be used to allow additional tags and attributes. The format is:
         <tag1> <attribute1a> <attribute1b>|<tag2> <attribute2a> <attribute2b>
         

        Example:
         h1|h2|a href class style|div align style
         
        Parameters:
        platformProps -
        exceptions -
        Returns: