Class DefaultEscapeHandler

  • All Implemented Interfaces:
    EscapeHandler

    public class DefaultEscapeHandler
    extends java.lang.Object
    implements EscapeHandler
    Escapes &, <, >, quotes (in attribute) and everything above the US-ASCII code range. Similar to com.sun.xml.bind.marshaller.DumbEscapeHandler or apache.commons.text.StringEscapeUtils#escapeXml
    Since:
    9.1.7
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String escape​(char[] arr, boolean isAttribute)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultEscapeHandler

        public DefaultEscapeHandler()
    • Method Detail

      • escape

        public java.lang.String escape​(char[] arr,
                                       boolean isAttribute)
        Specified by:
        escape in interface EscapeHandler
        Parameters:
        arr - the characters to escape
        isAttribute - true if it is an attribute value