From 4649188b9632bdfeb6c24446104eab3ed9070631 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 2 Jan 2011 13:22:54 +0100 Subject: [PATCH] Fix detection of .42 domains --- src/utils/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/web.py b/src/utils/web.py index 6a1fa9361..8935f7ef5 100644 --- a/src/utils/web.py +++ b/src/utils/web.py @@ -57,7 +57,7 @@ _octet = r'(?:2(?:[0-4]\d|5[0-5])|1\d\d|\d{1,2})' _ipAddr = r'%s(?:\.%s){3}' % (_octet, _octet) # Base domain regex off RFC 1034 and 1738 _label = r'[0-9a-z][-0-9a-z]*[0-9a-z]?' -_domain = r'%s(?:\.%s)*\.[a-z][-0-9a-z]*[a-z]?' % (_label, _label) +_domain = r'%s(?:\.%s)*\.[0-9a-z][-0-9a-z]+' % (_label, _label) _urlRe = r'(\w+://(?:%s|%s)(?::\d+)?(?:/[^\])>\s]*)?)' % (_domain, _ipAddr) urlRe = re.compile(_urlRe, re.I) _httpUrlRe = r'(https?://(?:%s|%s)(?::\d+)?(?:/[^\])>\s]*)?)' % (_domain,