class CurrencyCodeSanitizer implements Sanitizer<String> {

    @Override
    public String execute(String content) {
        if (StringUtils.isBlank(content)) {
            return content;
        }
        try {
            return Currency.getInstance(StringUtils.upperCase(content)).toString();
        } catch (Exception e) {
            HtmlSanitizer htmlSanitizer = new HtmlSanitizer();
            String sanitized = htmlSanitizer.execute(content);
            _logger.warn("Invalid currency code (" + sanitized + "). Setting currency code to \"USD\".");
            return "USD";
        }
    }

}