Take a look at Django's truncatewords_html filter https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#truncatewords-html
On Oct 13, 2011, at 5:03 PM, Jay Baker wrote: > Anyone come across a version of truncate (or something that could be > 'ported') that works with html? In other words, something that understands > tags so you can use it with safe. So it doesn't truncate in the middle of an > anchor tag or the like. > What do blog implementations use? > > Thanks for your help. > > -- > You received this message because you are subscribed to the Google Groups > "pocoo-libs" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/pocoo-libs/-/t9MxMX7CeckJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/pocoo-libs?hl=en. -- You received this message because you are subscribed to the Google Groups "pocoo-libs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pocoo-libs?hl=en.
