if (value != null && !StringUtil.TYPE_REGEX.equals(escapeFormat) && !StringUtil.TYPE_JSON.equals(escapeFormat)) {
value = StringUtil.escapeRegex(value);
}
//escape special char in HashVariable
var = cachedPlugin.escapeHashVariable(var);
//replace
if (value != null) {
// clean to prevent XSS
value = StringUtil.stripHtmlRelaxed(value);