MantisBT: master-1.2.x fd63b966

Author Committer Branch Timestamp Parent
dhx dhx master-1.2.x 2010-02-09 22:46 master-1.2.x 1b277fc8
Affected Issues  0011485: string_shorten function doesn't trim long strings which don't contain word boundaries
Changeset

Fix 0011485: string_shorten doesn't trim long strings without boundaries

The string_shorten function tries to find suitable word boundaries upon
which the string can be truncated. If the string is over the maximum
allowed length and no word boundaries are found, the function doesn't
bother truncating the only word found in the string.

Thus dropdowns could contain very long single word strings such as
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...etc'
with the maximum dropdown width setting having no effect.

mod - core/string_api.php Diff File