From b472e0381a95660b0ff37035426504c415dc678a Mon Sep 17 00:00:00 2001 From: Irfan Date: Mon, 28 Jun 2021 22:03:32 +0500 Subject: [PATCH] fix
not producing new line --- src/Helper/JString.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Helper/JString.php b/src/Helper/JString.php index e30c0500..60ade611 100644 --- a/src/Helper/JString.php +++ b/src/Helper/JString.php @@ -16,6 +16,11 @@ class JString */ public static function cleanse(string $string): string { + //
to new line + $string = str_replace( + ["
", "
", "
", "
"], "\\n", $string + ); + // remove control characters $string = preg_replace('~[[:cntrl:]]~', "", $string);