From 4cceac1f460264e336ea496923781da885061e25 Mon Sep 17 00:00:00 2001 From: NefiteTifall | Nicolas <58378334+NefiteTifall@users.noreply.github.com> Date: Mon, 10 Feb 2025 15:48:04 +0100 Subject: [PATCH 1/2] FIX: Correct HTML escaping function --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fae36b1f6f2..b21a6f45fe9 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13024,7 +13024,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u ); if (!empty($helpText)) { - $attr['title'] = dol_escape_htmltag($helpText); + $attr['title'] = dol_escape_php($helpText); } elseif ($label) { // empty($attr['title']) && $attr['title'] = $label; $useclassfortooltip = 0; From b4f06c8f1c49209072860e249aec4ccbc931ba63 Mon Sep 17 00:00:00 2001 From: NefiteTifall | Nicolas Date: Tue, 11 Feb 2025 10:20:23 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=A7=20Remove=20escape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eliminated unnecessary escaping of help text in button titles, simplifying the code and ensuring that the title attribute directly uses the provided help text without modification. --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b21a6f45fe9..0c3ce6892f0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13024,7 +13024,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u ); if (!empty($helpText)) { - $attr['title'] = dol_escape_php($helpText); + $attr['title'] = $helpText; } elseif ($label) { // empty($attr['title']) && $attr['title'] = $label; $useclassfortooltip = 0;