Package com.github.jknack.handlebars
Class EscapingStrategy.Hbs
- java.lang.Object
-
- com.github.jknack.handlebars.EscapingStrategy.Hbs
-
- All Implemented Interfaces:
EscapingStrategy
- Enclosing interface:
- EscapingStrategy
public static class EscapingStrategy.Hbs extends java.lang.Object implements EscapingStrategy
Handlebars escaping strategy. Escape is done via a string map. SeeEscapingStrategy.HTML_ENTITY
.- Since:
- 4.0.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.jknack.handlebars.EscapingStrategy
EscapingStrategy.Hbs
-
-
Field Summary
-
Fields inherited from interface com.github.jknack.handlebars.EscapingStrategy
CSV, DEF, HBS3, HBS4, HTML_ENTITY, JS, NOOP, XML
-
-
Constructor Summary
Constructors Constructor Description Hbs(java.lang.String[][] escapeMap)
Creates a newEscapingStrategy.Hbs
escaping strategy.Hbs(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> escapeMap)
Creates a newEscapingStrategy.Hbs
escaping strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequence
escape(java.lang.CharSequence value)
Escape theCharSequence
.
-
-
-
Constructor Detail
-
Hbs
public Hbs(java.lang.String[][] escapeMap)
Creates a newEscapingStrategy.Hbs
escaping strategy.- Parameters:
escapeMap
- A escape map.
-
Hbs
public Hbs(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> escapeMap)
Creates a newEscapingStrategy.Hbs
escaping strategy.- Parameters:
escapeMap
- A escape map.
-
-
Method Detail
-
escape
public java.lang.CharSequence escape(java.lang.CharSequence value)
Description copied from interface:EscapingStrategy
Escape theCharSequence
.- Specified by:
escape
in interfaceEscapingStrategy
- Parameters:
value
- the character sequence to be escaped.- Returns:
- the escaped character sequence.
-
-