summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-09-13 23:02:29 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-09-13 23:02:29 +0000
commit759625cd90f36976b1bc98c1dd9de0e8fe309bee (patch)
tree9ddd4826e7ac81438af610112ae966c96808a2dc /docs/ref
parentb176bd4f1e626827899514c5552c41d4ac1453c6 (diff)
[1.2.X] Fixed #13765 - 'safe' parameter for urlencode filter
Thanks to KyleMac for the suggestion and SmileyChris for the patch Backport of [13849] from trunk git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13850 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