Interface EscapingStrategyPlugin
-
- All Superinterfaces:
Plugin
- All Known Implementing Classes:
JsonEscapingStrategy
,NoneEscapingStrategy
,XmlEscapingStrategy
public interface EscapingStrategyPlugin extends Plugin
Plugin that provides anEscapingStrategy
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
accepts(String fileExtension, EscapingStrategyContext pluginContext)
Checks if the plugin can be applied to files with the given file extension.CharSequence
escape(CharSequence value, EscapingStrategyContext pluginContext)
Escape theCharSequence
.
-
-
-
Method Detail
-
accepts
boolean accepts(String fileExtension, EscapingStrategyContext pluginContext)
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
CharSequence escape(CharSequence value, EscapingStrategyContext pluginContext)
Escape theCharSequence
.- Parameters:
value
- the character sequence to be escaped.pluginContext
- Plugin context- Returns:
- the escaped character sequence.
-
-