Changeset 8215 for django/branches/gis/django/utils/html.py
- Timestamp:
- 08/05/08 12:15:33 (5 months ago)
- Files:
-
- django/branches/gis (modified) (1 prop)
- django/branches/gis/django/utils/html.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis
- Property svnmerge-integrated changed from /django/trunk:1-7978 to /django/trunk:1-8214
django/branches/gis/django/utils/html.py
r7768 r8215 95 95 nofollow_attr = nofollow and ' rel="nofollow"' or '' 96 96 for i, word in enumerate(words): 97 match = punctuation_re.match(word) 97 match = None 98 if '.' in word or '@' in word or ':' in word: 99 match = punctuation_re.match(word) 98 100 if match: 99 101 lead, middle, trail = match.groups() … … 103 105 url = urlquote(middle, safe='/&=:;#?+*') 104 106 elif middle.startswith('www.') or ('@' not in middle and \ 105 len(middle) > 0and middle[0] in string.ascii_letters + string.digits and \107 middle and middle[0] in string.ascii_letters + string.digits and \ 106 108 (middle.endswith('.org') or middle.endswith('.net') or middle.endswith('.com'))): 107 109 url = urlquote('http://%s' % middle, safe='/&=:;#?+*')
