changeset 5872:fd6bde2325d8

helpers: don't truncate words when when truncating texts for urlification This would especially cause confusion when URLs were truncated.
author domruf <dominikruf@gmail.com>
date Fri, 26 Feb 2016 18:59:34 +0100
parents 051d6547fa6c
children a9e0ea9ecc91
files kallithea/lib/helpers.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/helpers.py	Tue May 03 12:17:44 2016 +0000
+++ b/kallithea/lib/helpers.py	Fri Feb 26 18:59:34 2016 +0100
@@ -1256,7 +1256,7 @@
     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)