Class CharacterEscaper


  • public class CharacterEscaper
    extends Object
    Allows the escaping of characters with HTML entities. The escaped characters are expressed as a Map, linking the the Unicode character to the corresponding HTML entity. By default characters in the ordinal range 192-255 are escaped.
    Author:
    Mauro Talevi
    • Constructor Detail

      • CharacterEscaper

        public CharacterEscaper()
      • CharacterEscaper

        public CharacterEscaper​(Map<String,​String> characters)
    • Method Detail

      • defaultEscapedCharacters

        public static Map<String,​String> defaultEscapedCharacters()
        Returns the escaped characters from ordinal number range 192-255
        Returns:
        A Map of escaped characters
      • escapedCharacters

        public static Map<String,​String> escapedCharacters​(int from,
                                                                 int to)
        Returns the escaped characters from ordinal number range provided
        Returns:
        A Map of escaped characters