From 43fb768c1317492e74b60fbc19d4be129b89b462 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Thu, 4 Jan 2024 01:29:02 -0500 Subject: [PATCH] Fixes #693 --- lib/Minify.php | 2 +- lib/Minify/HTML/Helper.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Minify.php b/lib/Minify.php index d8b7fac..f6f1cb1 100644 --- a/lib/Minify.php +++ b/lib/Minify.php @@ -471,7 +471,7 @@ class Minify */ public function errorExit($header, $url = '', $msgHtml = '') { - $url = htmlspecialchars($url, ENT_QUOTES); + $url = htmlspecialchars($url); list(, $h1) = explode(' ', $header, 2); $h1 = htmlspecialchars($h1); // FastCGI environments require 3rd arg to header() to be set diff --git a/lib/Minify/HTML/Helper.php b/lib/Minify/HTML/Helper.php index bfded8b..28455c2 100644 --- a/lib/Minify/HTML/Helper.php +++ b/lib/Minify/HTML/Helper.php @@ -52,7 +52,7 @@ class Minify_HTML_Helper } $uri = $h->getRawUri($opts['farExpires'], $opts['debug']); - return htmlspecialchars($uri, ENT_QUOTES, $opts['charset']); + return htmlspecialchars($uri, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, $opts['charset']); } /**