Closed bramley closed 2 years ago
I've tested this and it works fine. I will also push the tests I use to the repo in a new PR. It related to #876 which can be updated to use the new shortenText. There's a slight difference in that substr takes the first X characters, where shortenText takes the first and the last and puts ... in between. But that's cosmetic.
This pull request has been mentioned on phpList Discuss. There might be relevant details there:
https://discuss.phplist.org/t/3-6-9-release-candidate-ready-for-testing/8445/1
This pull request has been mentioned on phpList Discuss. There might be relevant details there:
https://discuss.phplist.org/t/phplist-3-6-9-is-available-for-download/8474/1
Description
shortenTextDisplay()
currently returns aspan
element which can be used when displaying URLs or email addresses.This change splits the part of shortening text that needs to be multibyte aware into a separate function so that it can be used on its own to shorten other text, such as an attribute name in a
select
list.It also fixes a few small issues that were introduced in earlier pull requests
sprintf()
with more parameters than %s placeholdersondblclick()
handler which had been removed from the non multibyte versionRelated Issue
The new function
shortenText()
can be used instead ofshortenTextDisplay()
in PR https://github.com/phpList/phplist3/pull/876Screenshots (if appropriate):