From 0e78982e06674a076e52788af121d9825516cf99 Mon Sep 17 00:00:00 2001 From: oaz-tech Date: Thu, 25 Feb 2021 16:08:08 +0100 Subject: [PATCH 1/3] convetion to UTF-8 to prevent the mistake, Binary or non UTF-8 characters mistake. (relation to the characters used in this document and the special characters). Solve issues: 35 --- src/TinyHtmlMinifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TinyHtmlMinifier.php b/src/TinyHtmlMinifier.php index d628c06..3b335cf 100644 --- a/src/TinyHtmlMinifier.php +++ b/src/TinyHtmlMinifier.php @@ -79,7 +79,7 @@ public function minify(string $html) : string $rest = (isset($parts[1])) ? $parts[1] : ''; } - return $this->output; + return utf8_encode($this->output); } // Walk trough html From 4af2e1c48d46b10889e4b7972b98c8bbfbf0ad7d Mon Sep 17 00:00:00 2001 From: Oussama ANDALOUSSI <31129762+oaztech@users.noreply.github.com> Date: Thu, 25 Feb 2021 16:54:56 +0100 Subject: [PATCH 2/3] Update TinyHtmlMinifier.php --- src/TinyHtmlMinifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TinyHtmlMinifier.php b/src/TinyHtmlMinifier.php index 3b335cf..3b1b6de 100644 --- a/src/TinyHtmlMinifier.php +++ b/src/TinyHtmlMinifier.php @@ -79,7 +79,7 @@ public function minify(string $html) : string $rest = (isset($parts[1])) ? $parts[1] : ''; } - return utf8_encode($this->output); + return mb_convert_encoding($this->output, "UTF-8") } // Walk trough html From 574cd1ddaed2067d25990c64b8b14ee9dbf2ed22 Mon Sep 17 00:00:00 2001 From: oaz-tech Date: Sun, 28 Feb 2021 00:43:46 +0100 Subject: [PATCH 3/3] Convetion to UTF-8 to prevent the mistake, Binary or non UTF-8 characters mistake. (relation to the characters used in this document and the special characters). issues: 35 --- src/TinyHtmlMinifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TinyHtmlMinifier.php b/src/TinyHtmlMinifier.php index d628c06..e7561dd 100644 --- a/src/TinyHtmlMinifier.php +++ b/src/TinyHtmlMinifier.php @@ -79,7 +79,7 @@ public function minify(string $html) : string $rest = (isset($parts[1])) ? $parts[1] : ''; } - return $this->output; + return mb_convert_encoding($this->output, "UTF-8"); } // Walk trough html