Skip to content

Commit

Permalink
bugfix: use chunk_split
Browse files Browse the repository at this point in the history
  • Loading branch information
djarran committed Dec 16, 2024
1 parent cacca1a commit 4d76356
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3148,8 +3148,9 @@ function facetoface_ical_escape($text, $converthtml=false) {
);

// Text should be wordwrapped at 75 octets, and there should be one whitespace after the newline that does the wrapping.
$text = wordwrap($text, 75, " \n ", true);

// Use chunk_split so that words are wrapped exactly at 75 characters as opposed to wordwrap function
// that wraps at word bounaries.
$text = rtrim(chunk_split($text, 75, "\n "), "\n ");
return $text;
}

Expand Down

0 comments on commit 4d76356

Please sign in to comment.