summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-09-13 23:01:34 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-09-13 23:01:34 +0000
commit6fb4f6e2996cf442b614a073f30839419d9db030 (patch)
tree4b7973cb9ae8aecd4b589220ac93a5eb1db6e662 /docs/ref
parent76366aab18a0308f1465feb6236bff9e2907e570 (diff)
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
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/templates/builtins.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index 4f33bd212c..85c0b6dc26 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -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