code: def safe_url(self, url, errors='strict'):
          
          if url is not None:
              url = quote(self.s(url, errors=errors), safe='~')
          return url
docs: URL encode value for safe HTTP request.
  
          Args:
              url (string): The string to URL Encode.
  
          Returns:
              (string): The urlencoded string.