Interface EscapingStrategyPlugin
- All Superinterfaces:
Plugin
- All Known Implementing Classes:
JsonEscapingStrategy,NoneEscapingStrategy,XmlEscapingStrategy
Plugin that provides an
EscapingStrategy to be used by Handlebars when replacing variables in a template.
Please keep in mind that this strategy is applied to every variable and does not regard the context where
the variable takes place in within the template.-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(String fileExtension, EscapingStrategyContext pluginContext) Checks if the plugin can be applied to files with the given file extension.escape(CharSequence value, EscapingStrategyContext pluginContext) Escape theCharSequence.
-
Method Details
-
accepts
Checks if the plugin can be applied to files with the given file extension.- Parameters:
fileExtension- File extensionpluginContext- Plugin context- Returns:
- true when the plugin can be applied to the given file.
-
escape
Escape theCharSequence.- Parameters:
value- the character sequence to be escaped.pluginContext- Plugin context- Returns:
- the escaped character sequence.
-