From 0fe484ecd6ceec5eb3a284f4d2f875b31522f62d Mon Sep 17 00:00:00 2001 From: Hystepik Date: Fri, 10 Jan 2025 13:00:11 +0100 Subject: [PATCH] better fix --- htdocs/core/class/translate.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 905ccf9349b..2e7db582b5f 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -699,7 +699,7 @@ class Translate $str ); - $str = preg_replace('/%\)/', '__percent__)', $str); + $str = preg_replace('/%\)/', '__percent_parentesis__', $str); if (strpos($key, 'Format') !== 0) { try { @@ -710,7 +710,7 @@ class Translate } } - $str = str_replace('__percent__', '%', $str); + $str = str_replace('__percent_parentesis__', '%)', $str); // Encode string into HTML $str = htmlentities($str, ENT_COMPAT, $this->charset_output); // Do not convert simple quotes in translation (strings in html are embraced by "). Use dol_escape_htmltag around text in HTML content