-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update string.php to address issues in #23058
Previous code had four problems: 1. with $noSplit true if the break point is at the end of a word then that word is cut - it should be included as the whole word could be included in $length 2. with $noSplit true if the break point is after the space after a word then the word is cut making the resultant truncated string shorter than it need be as the whole word without the trailing space could be included within $length 3. with $allowHtml true then if the string starts with a tag`<...` and the break occurs in the middle of a tag then fragments of html are left in the truncated string 4. with $allowHtml true then if the string starts with a tag the ellipsis is place after the tag is closed - it should appear immediately before the tag closure.
- Loading branch information
1 parent
1b47679
commit 18d9760
Showing
1 changed file
with
41 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters