From 2276110b0feb9e87cfc70905fc30704f6550d402 Mon Sep 17 00:00:00 2001 From: dewekk <60457472+dewekk@users.noreply.github.com> Date: Fri, 14 Mar 2025 09:46:10 +0900 Subject: [PATCH] =?UTF-8?q?utf8=5Fnormalize=5Fspaces=20=ED=95=A8=EC=88=98?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20?= =?UTF-8?q?=EA=B3=B5=EB=B0=B1=20=EB=AC=B8=EC=9E=90=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/functions.php b/common/functions.php index 84147358d..17c243e46 100644 --- a/common/functions.php +++ b/common/functions.php @@ -680,7 +680,7 @@ function utf8_mbencode($str): string */ function utf8_normalize_spaces($str, bool $multiline = false): string { - return $multiline ? preg_replace('/((?!\x0A)[\pZ\pC])+/u', ' ', (string)$str) : preg_replace('/[\pZ\pC]+/u', ' ', (string)$str); + return $multiline ? preg_replace(['/((?!\x0A)[\pZ\pC])+/u', '/\x20(?=\x0A)/u'], [' ', ''], (string)$str) : preg_replace('/[\pZ\pC]+/u', ' ', (string)$str); } /**