code: def repair_url(url):
      
      url = url.strip('\n')
      if not re.match(r"^http", url):
          url = "http://" + url
  
      if "?" in url:
          url, _ = url.split('?')
  
      if not url.endswith("/"):
          return url + "/"
      else :
          return url
docs: Fixes URL.
      @param url: url to repair.
      @param out: instance of StandardOutput as defined in this lib.
      @return: Newline characters are stripped from the URL string.
          If the url string parameter does not start with http, it prepends http://
          If the url string parameter does not end with a slash, appends a slash.
          If the url contains a query string, it gets removed.