diff options
| author | Tim Graham <timograham@gmail.com> | 2014-10-30 18:26:13 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-10-30 18:27:44 -0400 |
| commit | ee2e09864d40f9781bf38d8048b1ddeb56baa089 (patch) | |
| tree | f35902970504c31fec2576b003f299758d5633d6 | |
| parent | 30bd586a1c140216760ad89d4bd3170e9fdf26cf (diff) | |
[1.7.x] Fixed #23734 -- Replaced striptags in template filter overview since it has security implications.
Thanks Aymeric Augustin for the suggestion.
Backport of 08c5887f13 from master
| -rw-r--r-- | docs/topics/templates.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt index c74e0305f1..df3f1e88ca 100644 --- a/docs/topics/templates.txt +++ b/docs/topics/templates.txt @@ -168,13 +168,13 @@ used template filters: If ``value`` is ``['a', 'b', 'c', 'd']``, the output will be ``4``. -:tfilter:`striptags` - Strips all [X]HTML tags. For example:: +:tfilter:`filesizeformat` + Formats the value like a "human-readable" file size (i.e. ``'13 KB'``, + ``'4.1 MB'``, ``'102 bytes'``, etc). For example:: - {{ value|striptags }} + {{ value|filesizeformat }} - If ``value`` is ``"<b>Joel</b> <button>is</button> a - <span>slug</span>"``, the output will be ``"Joel is a slug"``. + If ``value`` is 123456789, the output would be ``117.7 MB``. Again, these are just a few examples; see the :ref:`built-in filter reference <ref-templates-builtins-filters>` for the complete list. |
