code: public static Object htmlSafeArgument(Object o) {
          if (o instanceof RawHtmlArgument)
              return ((RawHtmlArgument)o).getValue();
          if (o instanceof Number || o instanceof Calendar || o instanceof Date)
              // formatting numbers and date often requires that they be kept intact
              return o;
          if (o==null)
              return o;
  
          return escape(o.toString());
      }
docs: For XSS prevention, escape unsafe characters in String by default,
  unless it's specifically wrapped in {@link RawHtmlArgument}.