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
This commit is contained in:
Ralf Becker 2004-07-03 11:41:51 +00:00
parent 22870f672e
commit 9694c7e2ea

View File

@ -127,7 +127,12 @@ class html
function htmlspecialchars($str) function htmlspecialchars($str)
{ {
// add @ by lkneschke to supress warning about unknown charset // 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;
} }
/*! /*!