From: <be...@us...> - 2013-03-25 12:30:55
|
Revision: 11303 http://sourceforge.net/p/xoops/svn/11303 Author: beckmi Date: 2013-03-25 12:30:49 +0000 (Mon, 25 Mar 2013) Log Message: ----------- fix for https://sourceforge.net/p/xoops/bugs/1219/ (alain091) Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt XoopsCore/branches/2.5.x/2.5.6/htdocs/class/module.textsanitizer.php XoopsCore/branches/2.5.x/2.5.6/htdocs/include/formdhtmltextarea_preview.php Modified: XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt =================================================================== --- XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt 2013-03-25 06:29:33 UTC (rev 11302) +++ XoopsCore/branches/2.5.x/2.5.6/docs/changelog.250.txt 2013-03-25 12:30:49 UTC (rev 11303) @@ -1,7 +1,7 @@ XOOPS 2.5.x Changelog (Language changes: see: /docs/lang_diff.txt) =============================== -2013/02/04: Version 2.5.6 RC1 +2013/03/25: Version 2.5.6 RC1 =============================== Bugfixes: - Array to string conversion (geekwright/mamba) @@ -11,6 +11,7 @@ - fix for potential lack of rendering css and javascript in Installer on the last screen (culex) - fix for missing Protector logo under PHP 5.4 (mamba) - replacing ereg with preg_match in userutility.php (pmartina/paul) + - #1219 dhtmltextarea editor accent not displayed (cesag/alain091) Security fixes - XSS/CSRF vulnerability in system/admin/groupperm.php (Dingjie Yang,Qualys/trabis) Modified: XoopsCore/branches/2.5.x/2.5.6/htdocs/class/module.textsanitizer.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.6/htdocs/class/module.textsanitizer.php 2013-03-25 06:29:33 UTC (rev 11302) +++ XoopsCore/branches/2.5.x/2.5.6/htdocs/class/module.textsanitizer.php 2013-03-25 12:30:49 UTC (rev 11303) @@ -513,9 +513,11 @@ */ function &displayTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) { + $charset = (defined('_CHARSET') ? _CHARSET : 'UTF-8'); + $text = mb_convert_encoding($text, $charset, mb_detect_encoding($text,$charset.', ISO-8859-1', true)); if ($html != 1) { // html not allowed - $text = $this->htmlSpecialChars($text); + $text = $this->htmlSpecialChars($text,ENT_COMPAT,$charset); } $text = $this->codePreConv($text, $xcode); // Ryuji_edit(2003-11-18) if ($smiley != 0) { Modified: XoopsCore/branches/2.5.x/2.5.6/htdocs/include/formdhtmltextarea_preview.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.6/htdocs/include/formdhtmltextarea_preview.php 2013-03-25 06:29:33 UTC (rev 11302) +++ XoopsCore/branches/2.5.x/2.5.6/htdocs/include/formdhtmltextarea_preview.php 2013-03-25 12:30:49 UTC (rev 11303) @@ -38,7 +38,8 @@ } if (! headers_sent()) { - header('Content-Type:text/html; charset=ISO-8859-1'); + $charset = (defined('_CHARSET') ? _CHARSET : 'UTF-8'); + header('Content-Type:text/html; charset='.$charset); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Cache-Control: private, no-cache'); header('Pragma: no-cache'); |