mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-08 08:30:59 +00:00
use urlbase and new is_safe url functions
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1500 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
c904caa5c5
commit
130b89f866
1 changed files with 3 additions and 3 deletions
|
|
@ -23,14 +23,14 @@ import smtplib
|
|||
import email.Utils
|
||||
|
||||
import linkcheck
|
||||
import urlconnect
|
||||
import urlbase
|
||||
import linkcheck.log
|
||||
import linkcheck.dns.resolver
|
||||
|
||||
from linkcheck.i18n import _
|
||||
|
||||
|
||||
class MailtoUrl (urlconnect.UrlConnect):
|
||||
class MailtoUrl (urlbase.UrlBase):
|
||||
"""Url link with mailto scheme"""
|
||||
|
||||
def build_url (self):
|
||||
|
|
@ -45,7 +45,7 @@ class MailtoUrl (urlconnect.UrlConnect):
|
|||
# check syntax of emails
|
||||
for name, addr in self.addresses:
|
||||
username, domain = self._split_address(addr)
|
||||
if not linkcheck.url.is_valid_domain(domain):
|
||||
if not linkcheck.url.is_safe_domain(domain):
|
||||
raise linkcheck.LinkCheckerError(_("Invalid mail syntax"))
|
||||
linkcheck.log.debug(linkcheck.LOG_CHECK, "addresses: %s",
|
||||
self.addresses)
|
||||
|
|
|
|||
Loading…
Reference in a new issue