code: def check_url(self, url, is_image_src=False):
          
          return bool(self._allowed_url_re.match(url))
docs: This method is used to check a URL.
  
          Returns :obj:`True` if the URL is "safe", :obj:`False` otherwise.
  
          The default implementation only allows HTTP and HTTPS links. That means
          no ``mailto:``, no ``xmpp:``, no ``ftp:``, etc.
  
          This method exists specifically to allow easy customization of link
          filtering through subclassing, so don't hesitate to write your own.
  
          If you're thinking of implementing a blacklist approach, see
          "`Which URL schemes are dangerous (XSS exploitable)?
          <http://security.stackexchange.com/q/148428/37409>`_".