Ticket #14912: urlize.diff

File urlize.diff, 1.3 KB (added by Adam Vandenberg, 13 years ago)
  • docs/ref/templates/builtins.txt

    diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
    index da8cac8..eec43bc 100644
    a b If ``value`` is ``"http://www.example.org/"``, the output will be  
    20732073urlize
    20742074~~~~~~
    20752075
    2076 Converts URLs in plain text into clickable links.
     2076Converts any URLs in text into clickable links.
     2077
     2078Works on ``http://``, ``https://``, ``www.`` links and links ending in
     2079``.org``, ``.net`` or ``.com``. Links can have trailing punctuation (periods,
     2080commas, close-parens) and leading punctuation (opening parens) and it'll still
     2081do the right thing.
     2082
     2083URLs in link text will get a ``rel="nofollow"`` attribute.
    20772084
    20782085Note that if ``urlize`` is applied to text that already contains HTML markup,
    20792086things won't work as expected. Apply this filter only to *plain* text.
    For example::  
    20842091
    20852092If ``value`` is ``"Check out www.djangoproject.com"``, the output will be
    20862093``"Check out <a
    2087 href="http://www.djangoproject.com">www.djangoproject.com</a>"``.
     2094href="http://www.djangoproject.com" rel="nofollow">www.djangoproject.com</a>"``.
     2095
     2096``urlize`` takes an optional parameter ``autoescape``.
     2097
     2098If ``autoescape`` is ``True``, the link text and URLs will get autoescaped.
    20882099
    20892100.. templatefilter:: urlizetrunc
    20902101
Back to Top