Skip to content

Commit

Permalink
[1.6.x] Fixed #21101 -- Updated urlize documentation to mention email…
Browse files Browse the repository at this point in the history
… addresses

Backport of 39b49fd from master
  • Loading branch information
goetzb authored and timgraham committed Sep 13, 2013
1 parent 7a2adec commit 097fb98
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/ref/templates/builtins.txt
Expand Up @@ -2220,7 +2220,7 @@ If ``value`` is ``"http://www.example.org/"``, the output will be
urlize urlize
^^^^^^ ^^^^^^


Converts URLs in text into clickable links. Converts URLs and email addresses in text into clickable links.


This template tag works on links prefixed with ``http://``, ``https://``, or This template tag works on links prefixed with ``http://``, ``https://``, or
``www.``. For example, ``http://goo.gl/aia1t`` will get converted but ``www.``. For example, ``http://goo.gl/aia1t`` will get converted but
Expand All @@ -2244,6 +2244,11 @@ If ``value`` is ``"Check out www.djangoproject.com"``, the output will be
``"Check out <a href="http://www.djangoproject.com" ``"Check out <a href="http://www.djangoproject.com"
rel="nofollow">www.djangoproject.com</a>"``. rel="nofollow">www.djangoproject.com</a>"``.


In addition to web links, ``urlize`` also converts email addresses into
``mailto:`` links. If ``value`` is
``"Send questions to foo@example.com"``, the output will be
``"Send questions to <a href="mailto:foo@example.com">foo@example</a>"``.

The ``urlize`` filter also takes an optional parameter ``autoescape``. If The ``urlize`` filter also takes an optional parameter ``autoescape``. If
``autoescape`` is ``True``, the link text and URLs will be escaped using ``autoescape`` is ``True``, the link text and URLs will be escaped using
Django's built-in :tfilter:`escape` filter. The default value for Django's built-in :tfilter:`escape` filter. The default value for
Expand All @@ -2259,7 +2264,7 @@ Django's built-in :tfilter:`escape` filter. The default value for
urlizetrunc urlizetrunc
^^^^^^^^^^^ ^^^^^^^^^^^


Converts URLs into clickable links just like urlize_, but truncates URLs Converts URLs and email addresses into clickable links just like urlize_, but truncates URLs
longer than the given character limit. longer than the given character limit.


**Argument:** Number of characters that link text should be truncated to, **Argument:** Number of characters that link text should be truncated to,
Expand Down

0 comments on commit 097fb98

Please sign in to comment.