diff options
| author | Goetz <goetz.buerkle@gmail.com> | 2013-09-13 16:45:42 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-13 12:42:06 -0400 |
| commit | 39b49fd33970720b973498d2c8275ced129d3a7a (patch) | |
| tree | 1d0c09eabe9289dcfa2d577e82e757974d0fb6d2 | |
| parent | ec89e1725a29076d37b36f85de983b8a7cf7c329 (diff) | |
Fixed #21101 -- Updated urlize documentation to mention email addresses
| -rw-r--r-- | docs/ref/templates/builtins.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 9d096e44b3..cc1ca46e9f 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -2226,7 +2226,7 @@ If ``value`` is ``"http://www.example.org/"``, the output will be 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 ``www.``. For example, ``http://goo.gl/aia1t`` will get converted but @@ -2250,6 +2250,11 @@ If ``value`` is ``"Check out www.djangoproject.com"``, the output will be ``"Check out <a href="http://www.djangoproject.com" 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 ``autoescape`` is ``True``, the link text and URLs will be escaped using Django's built-in :tfilter:`escape` filter. The default value for @@ -2265,7 +2270,7 @@ Django's built-in :tfilter:`escape` filter. The default value for 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. **Argument:** Number of characters that link text should be truncated to, |
