Skip to content

Commit

Permalink
Merge pull request #19 from WebFiori/dev
Browse files Browse the repository at this point in the history
Update Email.php
  • Loading branch information
usernane authored Jan 15, 2024
2 parents 08be85e + 13c0c19 commit f4978f2
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 f4978f2

Please sign in to comment.