Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.5.x] Fixed #21101 -- Updated urlize documentation to mention email…

… addresses

Backport of 39b49fd from master
  • Loading branch information...
commit dbc2e8eb73ca15fd3f2b9c5ddfa69651330bcead 1 parent 61de572
Goetz authored September 13, 2013 timgraham committed September 13, 2013

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. 9  docs/ref/templates/builtins.txt
9  docs/ref/templates/builtins.txt
@@ -2164,7 +2164,7 @@ If ``value`` is ``"http://www.example.org/"``, the output will be
2164 2164
 urlize
2165 2165
 ^^^^^^
2166 2166
 
2167  
-Converts URLs in text into clickable links.
  2167
+Converts URLs and email addresses in text into clickable links.
2168 2168
 
2169 2169
 This template tag works on links prefixed with ``http://``, ``https://``, or
2170 2170
 ``www.``. For example, ``http://goo.gl/aia1t`` will get converted but
@@ -2193,6 +2193,11 @@ If ``value`` is ``"Check out www.djangoproject.com"``, the output will be
2193 2193
 ``"Check out <a href="http://www.djangoproject.com"
2194 2194
 rel="nofollow">www.djangoproject.com</a>"``.
2195 2195
 
  2196
+In addition to web links, ``urlize`` also converts email addresses into
  2197
+``mailto:`` links. If ``value`` is
  2198
+``"Send questions to foo@example.com"``, the output will be
  2199
+``"Send questions to <a href="mailto:foo@example.com">foo@example</a>"``.
  2200
+
2196 2201
 The ``urlize`` filter also takes an optional parameter ``autoescape``. If
2197 2202
 ``autoescape`` is ``True``, the link text and URLs will be escaped using
2198 2203
 Django's built-in :tfilter:`escape` filter. The default value for
@@ -2208,7 +2213,7 @@ Django's built-in :tfilter:`escape` filter. The default value for
2208 2213
 urlizetrunc
2209 2214
 ^^^^^^^^^^^
2210 2215
 
2211  
-Converts URLs into clickable links just like urlize_, but truncates URLs
  2216
+Converts URLs and email addresses into clickable links just like urlize_, but truncates URLs
2212 2217
 longer than the given character limit.
2213 2218
 
2214 2219
 **Argument:** Number of characters that link text should be truncated to,

0 notes on commit dbc2e8e

Please sign in to comment.
Something went wrong with that request. Please try again.