code: private String ensureMinimalEscaping(String u, final String charset) {
          return ensureMinimalEscaping(u, charset, LaxURLCodec.EXPANDED_URI_SAFE);
      }
docs: Ensure that there all characters needing escaping
  in the passed-in String are escaped. Stray '%' characters
  are *not* escaped, as per browser behavior.
  
  @param u String to escape
  @param charset
  @return string with any necessary escaping applied