Skip to content

Commit 709a0bb

Browse files
committed
- Legacy-Id: 1864
1 parent c68ab3f commit 709a0bb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

django/utils/html.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ def urlize(text, trim_url_limit=None, nofollow=False, autoescape=False):
9494
trim_url = lambda x, limit=trim_url_limit: limit is not None and (len(x) > limit and ('%s...' % x[:max(0, limit - 3)])) or x
9595
safe_input = isinstance(text, SafeData)
9696
words = word_split_re.split(force_unicode(text))
97-
nofollow_attr = nofollow and ' rel="nofollow"' or ''
97+
# Fix http://code.djangoproject.com/ticket/12183
98+
# (Pasi Eronen, 2009-11-12)
9899
for i, word in enumerate(words):
100+
nofollow_attr = nofollow and ' rel="nofollow"' or ''
99101
match = None
100102
if '.' in word or '@' in word or ':' in word:
101103
match = punctuation_re.match(word)

0 commit comments

Comments
 (0)