code: protected String encode(final String source) {
          try {
              return URLEncoder.encode(source, "UTF-8");
          } catch(Exception ex) {
              throw new RuntimeException("Could not prepare view argument: " + ex);
          }
      }
docs: Helper method to properly encode a string.
  
  This method can be overridden if a different encoding logic needs to be
  used. If so, note that {@link #keys(JsonArray) keys} is not encoded via
  this method, but by the core.
  
  @param source source string.
  @return encoded target string.