public static Optional<MessageSanitizer> getMessageSanitizer() {
        return getBean(MessageSanitizer.BEAN_NAME, MessageSanitizer.class);
    }
Gets message sanitizer.

@return the message sanitizer
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/spring/ApplicationContextProvider.java