mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-07 08:10:57 +00:00
Intern patterns now accept URLs with and without "www." prefixes
as default. This allows sites to check that use both variants. git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3714 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
e73e5396d6
commit
df857aab8d
2 changed files with 7 additions and 0 deletions
|
|
@ -40,6 +40,11 @@
|
|||
Changed: linkcheck/director/__init__.py
|
||||
Closes: SF bug #1720104
|
||||
|
||||
* Intern patterns now accept URLs with and without "www." prefixes
|
||||
as default. This allows sites to check that use both variants.
|
||||
Type: feature
|
||||
Changed: linkcheck/checker/internpaturl.py
|
||||
|
||||
4.8 "Hallam Foe" (released 16.12.2007)
|
||||
|
||||
* Fix message typo for not disclosing information.
|
||||
|
|
|
|||
|
|
@ -51,4 +51,6 @@ class InternPatternUrl (urlbase.UrlBase):
|
|||
args = list(re.escape(x) for x in (scheme, domain, path))
|
||||
if args[0] in ('http', 'https'):
|
||||
args[0] = 'https?'
|
||||
if args[1].startswith('www\\.'):
|
||||
args[1] = r"(www\.|)%s" % args[1][5:]
|
||||
return "%s://%s%s" % tuple(args)
|
||||
|
|
|
|||
Loading…
Reference in a new issue