# HG changeset patch # User domruf # Date 2016-02-26 18:59:34 # Node ID fd6bde2325d8231ac9737b401e0f477ad3f847e7 # Parent 051d6547fa6ce39acac0a2eaa788ea4e6ef40fc8 helpers: don't truncate words when when truncating texts for urlification This would especially cause confusion when URLs were truncated. diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py +++ b/kallithea/lib/helpers.py @@ -1256,7 +1256,7 @@ def urlify_text(s, truncate=None, styliz Extract urls from text and make literal html links out of them """ if truncate is not None: - s = truncatef(s, truncate) + s = truncatef(s, truncate, whole_word=True) s = html_escape(s) if stylize: s = desc_stylize(s)