Skip to content

Commit

Permalink
Update Email.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Jan 15, 2024
1 parent 499d550 commit 13c0c19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webfiori/email/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,8 @@ private function setupBeoreTesting() {
* @return string The string after its control characters trimmed.
*/
private function trimControlChars(string $str) : string {
return trim($str, "\x00..\x20");
$trimmed = trim($str, "\x00..\x20");
//Removes any invalid line feed.
return preg_replace("/(\s*[\r\n]+\s*|\s+)/", ' ', $trimmed);
}
}

0 comments on commit 13c0c19

Please sign in to comment.