static encodeForUrl(input) {
    return encodeURIComponent(input).replace(/[!'.()*]/g, char =>
      '%' + char.charCodeAt(0).toString(16).toUpperCase()
    );
  }
Encodes a string to be used in a URL.
@param {String} input The string to encode.
@returns {String} The encoded string.