Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

… addresses

Backport of 39b49fd from master
  • Loading branch information...
commit 097fb98f81b9d9dd3faac45f5b93d620098041bc 1 parent 7a2adec
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
@@ -2220,7 +2220,7 @@ If ``value`` is ``"http://www.example.org/"``, the output will be
2220 2220
 urlize
2221 2221
 ^^^^^^
2222 2222
 
2223  
-Converts URLs in text into clickable links.
  2223
+Converts URLs and email addresses in text into clickable links.
2224 2224
 
2225 2225
 This template tag works on links prefixed with ``http://``, ``https://``, or
2226 2226
 ``www.``. For example, ``http://goo.gl/aia1t`` will get converted but
@@ -2244,6 +2244,11 @@ If ``value`` is ``"Check out www.djangoproject.com"``, the output will be
2244 2244
 ``"Check out <a href="http://www.djangoproject.com"
2245 2245
 rel="nofollow">www.djangoproject.com</a>"``.
2246 2246
 
  2247
+In addition to web links, ``urlize`` also converts email addresses into
  2248
+``mailto:`` links. If ``value`` is
  2249
+``"Send questions to foo@example.com"``, the output will be
  2250
+``"Send questions to <a href="mailto:foo@example.com">foo@example</a>"``.
  2251
+
2247 2252
 The ``urlize`` filter also takes an optional parameter ``autoescape``. If
2248 2253
 ``autoescape`` is ``True``, the link text and URLs will be escaped using
2249 2254
 Django's built-in :tfilter:`escape` filter. The default value for
@@ -2259,7 +2264,7 @@ Django's built-in :tfilter:`escape` filter. The default value for
2259 2264
 urlizetrunc
2260 2265
 ^^^^^^^^^^^
2261 2266
 
2262  
-Converts URLs into clickable links just like urlize_, but truncates URLs
  2267
+Converts URLs and email addresses into clickable links just like urlize_, but truncates URLs
2263 2268
 longer than the given character limit.
2264 2269
 
2265 2270
 **Argument:** Number of characters that link text should be truncated to,

0 notes on commit 097fb98

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