code: public static String getDisplayString(final Object value, final boolean htmlEscape) {
          final String displayValue = ObjectUtils.getDisplayString(value);
          return (htmlEscape ? HtmlUtils.htmlEscape(displayValue) : displayValue);
      }
docs: /*
  NOTE This code is based on org.springframework.web.servlet.tags.form.ValueFormatter as of Spring 5.0.0
  Original license is Apache License 2.0, which is the same as the license for this file.
  Original copyright notice is "Copyright 2002-2012 the original author or authors".
  Original authors are Rob Harrop and Juergen Hoeller.