aboutsummaryrefslogtreecommitdiffstats
path: root/functions/init/sanitize.php
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2009-05-20 17:13:19 +0000
committerJason Oster <parasytic@users.sourceforge.net>2009-05-20 17:13:19 +0000
commitc3aa2dd36440d0629e6b6032ce094a7a8bbd1732 (patch)
tree093f7b3c26490d21c87f9163d58e9f485b0307ec /functions/init/sanitize.php
parent78b585135fc16c268a9de69a1156231873995a49 (diff)
downloadphpicalendar-c3aa2dd36440d0629e6b6032ce094a7a8bbd1732.tar.gz
phpicalendar-c3aa2dd36440d0629e6b6032ce094a7a8bbd1732.tar.bz2
phpicalendar-c3aa2dd36440d0629e6b6032ce094a7a8bbd1732.zip
Add ellipsis to strings truncated by chopToWordCount()
Diffstat (limited to 'functions/init/sanitize.php')
-rw-r--r--functions/init/sanitize.php2
1 files changed, 1 insertions, 1 deletions
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;
}

© 2014-2021 Faster IT GmbH | imprint | privacy policy