##// END OF EJS Templates
Truncate post texts by words preserving html tags, not just by chars.
neko259 -
r61:4d743e53 default
parent child Browse files
Show More
@@ -34,7 +34,7 b''
34 >{% trans "Reply" %}</a>]
34 >{% trans "Reply" %}</a>]
35 </div>
35 </div>
36 {% autoescape off %}
36 {% autoescape off %}
37 {{ thread.text.rendered|truncatechars:300 }}
37 {{ thread.text.rendered|truncatewords_html:50 }}
38 {% endautoescape %}
38 {% endautoescape %}
39 </div>
39 </div>
40 <div class="metadata">
40 <div class="metadata">
@@ -75,7 +75,7 b''
75 [{{ post.pub_time }}]
75 [{{ post.pub_time }}]
76 </div>
76 </div>
77 {% autoescape off %}
77 {% autoescape off %}
78 {{ post.text.rendered|truncatechars:300 }}
78 {{ post.text.rendered|truncatewords_html:50 }}
79 {% endautoescape %}
79 {% endautoescape %}
80 </div>
80 </div>
81 </div>
81 </div>
General Comments 0
You need to be logged in to leave comments. Login now