From 9694c7e2eacf0ee07ea63a98634e38693a152b9b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 3 Jul 2004 11:41:51 +0000 Subject: [PATCH] fix for bug [ 954770 ] UTF-8 Support (in developer tools) - regular htmlspecialchars translated &#([0-9a-f]{4}); to &#\\1; - which is not correct, at least for our purpose ==> we replace '&#' after htmlspecialchars again with '&#' ==> now eg. persian language works correct in the TranslationTools --- phpgwapi/inc/class.html.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 32176bff17..a6cea8ae4e 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -127,7 +127,12 @@ class html function htmlspecialchars($str) { // add @ by lkneschke to supress warning about unknown charset - return @htmlspecialchars($str,ENT_COMPAT,$this->charset); + $str = @htmlspecialchars($str,ENT_COMPAT,$this->charset); + + // we need '&#' unchanged, so we translate it back + $str = str_replace('&#','&#',$str); + + return $str; } /*!