Fixed #22294 -- Prevented converting length filter output to string

Thanks Steve Pike for the report.
This commit is contained in:
Claude Paroz 2014-03-22 16:33:37 +01:00
parent 6a0291bdaf
commit bc315266c8
4 changed files with 10 additions and 6 deletions

View file

@ -1680,7 +1680,8 @@ For example::
{{ value|length }}
If ``value`` is ``['a', 'b', 'c', 'd']``, the output will be ``4``.
If ``value`` is ``['a', 'b', 'c', 'd']`` or ``"abcd"``, the output will be
``4``.
.. templatefilter:: length_is
@ -1693,7 +1694,8 @@ For example::
{{ value|length_is:"4" }}
If ``value`` is ``['a', 'b', 'c', 'd']``, the output will be ``True``.
If ``value`` is ``['a', 'b', 'c', 'd']`` or ``"abcd"``, the output will be
``True``.
.. templatefilter:: linebreaks