@Override
    public void handleText(final IText text) {
        val contentString = text.getText();
        if (!contentString.isEmpty() && contentString.trim().isEmpty()) {
            if (!writeWhitespace) {
                return;
            }
            writeWhitespace = false;
        }
        super.handleText(text);
    }
This is {@link CasThymeleafOutputTemplateHandler}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-thymeleaf-core/src/main/java/org/apereo/cas/services/web/CasThymeleafOutputTemplateHandler.java