better fix

This commit is contained in:
Hystepik 2025-01-10 13:00:11 +01:00
parent 6e4559a18c
commit 0fe484ecd6

View file

@ -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