From 08c5887f134da761dc59f52280116dd9849985a7 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 30 Oct 2014 18:26:13 -0400 Subject: [PATCH] Fixed #23734 -- Replaced striptags in template filter overview since it has security implications. Thanks Aymeric Augustin for the suggestion. --- docs/topics/templates.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt index 083c0c9a10e..4a0e03f8230 100644 --- a/docs/topics/templates.txt +++ b/docs/topics/templates.txt @@ -166,13 +166,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 ``"Joel a - slug"``, 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 ` for the complete list.