I came by a strange thing, tags are displayed not always in the same order. Even using the same tags on images.
http://img.skitch.com/20091126-n7g7e1us7jwk82i71g77wdbjin.jpg
See here.
Its just something I noticed, if the name of image is
123456789
and the code used would be
the results will be
12345...
However if the name of the image is
123456789...
then the results would be
123456789...
I don't really see it as that much of a bug, but like I said I did notice this as a user of mine used ... in the name of a file and for some reason it did not truncate.
Not sure what you are seeing. The code is as follows:
function truncate_string($string, $length, $elipsis='...') { if (strlen($string) > $length) { $pos = strpos($string, ' ', $length); if ($pos === FALSE) return substr($string, 0, $length) . $elipsis; return substr($string, 0, $pos) . $elipsis; } return $string; }
This will find the last space prior to the designated length and truncate there or it will chop at the lenght, so I do not see how the example you show could have occurred.