Package com.github.jknack.handlebars
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EscapingStrategy.Hbs
Handlebars escaping strategy.
-
Field Summary
Fields Modifier and Type Field Description static EscapingStrategy
CSV
Escape variable for CSV.static EscapingStrategy
DEF
Default escaping strategy.static EscapingStrategy
HBS3
LikeHTML_ENTITY
but ignores=
.static EscapingStrategy
HBS4
Default escaping strategy for Handlebars 4.x .static EscapingStrategy
HTML_ENTITY
The default HTML Entity escaping strategy.static EscapingStrategy
JS
Escape variable for JavaScript.static EscapingStrategy
NOOP
NOOP escaping.static EscapingStrategy
XML
Escape variable for XML.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.CharSequence
escape(java.lang.CharSequence value)
Escape theCharSequence
.
-
-
-
Field Detail
-
HTML_ENTITY
static final EscapingStrategy HTML_ENTITY
The default HTML Entity escaping strategy.
-
HBS3
static final EscapingStrategy HBS3
LikeHTML_ENTITY
but ignores=
.
-
HBS4
static final EscapingStrategy HBS4
Default escaping strategy for Handlebars 4.x .
-
CSV
static final EscapingStrategy CSV
Escape variable for CSV.
-
XML
static final EscapingStrategy XML
Escape variable for XML.
-
JS
static final EscapingStrategy JS
Escape variable for JavaScript.
-
NOOP
static final EscapingStrategy NOOP
NOOP escaping.
-
DEF
static final EscapingStrategy DEF
Default escaping strategy.
-
-