Mathias Biilmann 2989c38245 tpl: Add truncate template function
This commit adds a truncate template function for safely truncating text without
breaking words. The truncate function is HTML aware, so if the input text is a
template.HTML it will be truncated without leaving broken or unclosed HTML tags.

    {{ "this is a very long text" | truncate 10 " ..." }}
    {{ "With [Markdown](/markdown) inside." | markdownify | truncate 10 }}
2017-01-06 10:42:32 +01:00
..
2016-01-06 23:55:18 +01:00
2016-12-22 17:05:48 +01:00
2016-12-15 19:33:40 +01:00
2016-12-16 01:09:51 +01:00