let wordSafeShortText point to shortenTextWord

both functions should lead to the same result so this code duplication should be removed.