in src/main/java/org/apache/sling/xss/impl/XSSFilterImpl.java [388:399]
private static AntiSamyPolicy createAntiSamyPolicy(
@Nullable String policyPath, @NotNull Supplier<InputStream> policySupplier) {
String pathName = policyPath == null ? "embedded policy file" : policyPath;
try (InputStream policyStream = policySupplier.get()) {
PolicyHandler policyHandler = new PolicyHandler(policyStream);
logger.info("Installed policy from {}.", pathName);
return new AntiSamyPolicy(policyHandler, policyPath);
} catch (Exception e) {
logger.error("Unable to load policy from {}.", pathName, e);
return null;
}
}