diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index e6c8ea33502..8f1d46ed5ca 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -682,6 +682,7 @@ class Translate } } + $str = preg_replace('/([^%])%([^%0sdmYIMpHSBb])/', '\1__percent_with_bad_specifier__\2', $str); if (strpos($key, 'Format') !== 0) { @@ -695,6 +696,7 @@ class Translate $str = str_replace('__percent_with_bad_specifier__', '%', $str); + // We replace some HTML tags by __xx__ to avoid having them encoded by htmlentities because // we want to keep '"' '' '' '' '' '' '' '