Skip to content

Instantly share code, notes, and snippets.

@bobsilverberg
Created May 8, 2013 12:49
Show Gist options
  • Select an option

  • Save bobsilverberg/5540220 to your computer and use it in GitHub Desktop.

Select an option

Save bobsilverberg/5540220 to your computer and use it in GitHub Desktop.
def should_verify_url(self, url):
"""Return false if the url does not need to be verified."""
bad_urls = ['%s/' % self.base_url, '%s#' % self.base_url]
return not (url.startswith('%sjavascript' % self.base_url) or
url.startswith('%sftp://' % self.base_url) or
url.startswith('%sirc://' % self.base_url) or
url in bad_urls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment