class CobrandNameSanitizer implements Sanitizer<String> {

    @Override
    public String execute(String content) {
        if (StringUtils.isBlank(content)) {
            return content;
        }
        Pattern pattern = Pattern.compile("[\\w-]+");
        if (!pattern.matcher(content).matches()) {
            String sanitized = new HtmlSanitizer().execute(content);
            _logger.warn("Invalid cobrand name (" + sanitized + "). Setting cobrand name to \"default\".");
            return "default";
        }
        return content;
    }

}