code: public String url(String text) {
          if (text == null || text.isEmpty()) {
              return text;
          }
          try {
              return URLEncoder.encode(text, UTF_8);
          } catch (UnsupportedEncodingException ex) {
              LOGGER.warn("UTF-8 is not supported?");
              LOGGER.info("", ex);
          }
          return "";
      }
docs: URL Encodes the provided text.
  
  @param text the text to encode
  @return the URL encoded text