Skip to content

Commit

Permalink
fix <br> not converting to newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
irfan-dahir committed Jun 28, 2021
1 parent b896e68 commit 8c69f7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Helper/JString.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class JString
public static function cleanse(string $string): string
{
// convert any html before hand to new line
$string = str_replace(
["<br>", "<br />", "<br/>", "<br >"], "\\n", $string
);

// remove control characters
$string = preg_replace('~[[:cntrl:]]~', "", $string);
Expand Down

0 comments on commit 8c69f7c

Please sign in to comment.