From c0c03f5270a8afb79d52386a01365af9bdcde5c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Dec 2020 15:59:54 +0100 Subject: [PATCH] Fix allow tag
into translation strings --- htdocs/core/class/translate.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 3c0aa7fba9e..4202191b39a 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -623,8 +623,8 @@ class Translate // We replace some HTML tags by __xx__ to avoid having them encoded by htmlentities because // we want to keep '"' '' '' '' '' '
' '< ' '' that are reliable HTML tags inside translation strings. $str = str_replace( - array('"', '', '', '', '', '
', '
', '', '< ', '>'), // We accept '< ' but not '<'. We can accept however '>' - array('__quot__', '__tagbold__', '__tagboldend__', '__tagbold__', '__tagboldend__', '__taga__', '__tagaend__', '__tagbr__', '__tagspan__', '__tagspanend__', '__lt__', '__gt__'), + array('"', '', '', '
', '
', '', '', '
', '
', '', '< ', '>'), // We accept '< ' but not '<'. We can accept however '>' + array('__quot__', '__tagbold__', '__tagboldend__', '__tagcenter__', '__tagcenterend__', '__tagbold__', '__tagboldend__', '__taga__', '__tagaend__', '__tagbr__', '__tagspan__', '__tagspanend__', '__lt__', '__gt__'), $str ); @@ -638,8 +638,8 @@ class Translate // Restore reliable HTML tags into original translation string $str = str_replace( - array('__quot__', '__tagbold__', '__tagboldend__', '__taga__', '__tagaend__', '__tagbr__', '__tagspan__', '__tagspanend__', '__lt__', '__gt__'), - array('"', '', '', '
', '
', '', '< ', '> '), + array('__quot__', '__tagbold__', '__tagboldend__', '__tagcenter__', '__tagcenterend__', '__taga__', '__tagaend__', '__tagbr__', '__tagspan__', '__tagspanend__', '__lt__', '__gt__'), + array('"', '', '', '
', '
', '
', '
', '', '< ', '> '), $str );