From 0fd865ecd59090a1ab07e34eb3e8f73d09aa9989 Mon Sep 17 00:00:00 2001 From: Rodrigo Aguilera Date: Fri, 14 Oct 2022 22:42:52 +0200 Subject: [PATCH] Add a little bit more whitespace removal by trimming. --- src/Sanitizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sanitizer.php b/src/Sanitizer.php index d7d8659..c78f943 100644 --- a/src/Sanitizer.php +++ b/src/Sanitizer.php @@ -226,7 +226,7 @@ public function sanitize($dirty) // Remove any extra whitespaces when minifying if ($this->minifyXML) { - $clean = preg_replace('/\s+/', ' ', $clean); + $clean = trim(preg_replace('/\s+/', ' ', $clean)); } // Return result