Sanitizer sanitizer = new Sanitizer(Decision.Throw, '_');
sanitizer.allowAlphanumeric();
sanitizer.allowCharacters("!@$%^&*()[]{}_-+|<>,.");
sanitizer.setDecision("#= ", Decision.Throw);
for (Entry<String, String> entry : metadata.entrySet()) {
String key = sanitizer.clean(entry.getKey());
String value = sanitizer.clean(entry.getValue());
sb.append("# " + key + "=" + value + "\n");
}
sb.append("# __PLATFORMLAYER__METADATA__END__\n");