From c3aa2dd36440d0629e6b6032ce094a7a8bbd1732 Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Wed, 20 May 2009 17:13:19 +0000 Subject: Add ellipsis to strings truncated by chopToWordCount() --- functions/init/sanitize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'functions') diff --git a/functions/init/sanitize.php b/functions/init/sanitize.php index 0370f9f..da9fb3f 100644 --- a/functions/init/sanitize.php +++ b/functions/init/sanitize.php @@ -42,7 +42,7 @@ function chopToWordCount($string, $count) { $words = str_word_count($string, 2); $last_word = array_slice($words, $count, 1, true); $pos = key($last_word); - $string = substr($string, 0, $pos); + $string = substr($string, 0, $pos) . '...'; } return $string; } -- cgit v1.2.3