mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #13765 - 'safe' parameter for urlencode filter
Thanks to KyleMac for the suggestion and SmileyChris for the patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@13849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
76366aab18
commit
6fb4f6e299
4 changed files with 32 additions and 5 deletions
|
@ -1967,6 +1967,19 @@ For example::
|
|||
If ``value`` is ``"http://www.example.org/foo?a=b&c=d"``, the output will be
|
||||
``"http%3A//www.example.org/foo%3Fa%3Db%26c%3Dd"``.
|
||||
|
||||
.. versionadded:: 1.1
|
||||
|
||||
An optional argument containing the characters which should not be escaped can
|
||||
be provided.
|
||||
|
||||
If not provided, the '/' character is assumed safe. An empty string can be
|
||||
provided when *all* characters should be escaped. For example::
|
||||
|
||||
{{ value|urlencode:"" }}
|
||||
|
||||
If ``value`` is ``"http://www.example.org/"``, the output will be
|
||||
``"http%3A%2F%2Fwww.example.org%2F"``.
|
||||
|
||||
.. templatefilter:: urlize
|
||||
|
||||
urlize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue