Interface EscapingStrategy

  • All Known Implementing Classes:
    EscapingStrategy.Hbs

    public interface EscapingStrategy

    A strategy for determining how to escape a variable ({{variable}})..

    Usage:

        EscapingStrategy escapingStrategy = new EscapingStrategy() {
           public String escape(final CharSequence value) {
             // return the character sequence escaped however you want
           }
        };
        Handlebars handlebars = new Handlebars().with(escapingStrategy);
     
    Since:
    1.2.0
    • Method Detail

      • escape

        java.lang.CharSequence escape​(java.lang.CharSequence value)
        Escape the CharSequence.
        Parameters:
        value - the character sequence to be escaped.
        Returns:
        the escaped character sequence.