mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #11021 -- Clarified newline stripping behavior in the truncatewords and truncatewords_html filters. Thanks to Ben Spaulding for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
103f7f83eb
commit
806f3b26f8
3 changed files with 17 additions and 3 deletions
|
@ -1883,6 +1883,8 @@ For example::
|
|||
|
||||
If ``value`` is ``"Joel is a slug"``, the output will be ``"Joel is ..."``.
|
||||
|
||||
Newlines within the string will be removed.
|
||||
|
||||
.. templatefilter:: truncatewords_html
|
||||
|
||||
truncatewords_html
|
||||
|
@ -1902,6 +1904,8 @@ For example::
|
|||
If ``value`` is ``"<p>Joel is a slug</p>"``, the output will be
|
||||
``"<p>Joel is ...</p>"``.
|
||||
|
||||
Newlines in the HTML content will be preserved.
|
||||
|
||||
.. templatefilter:: unordered_list
|
||||
|
||||
unordered_list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue