From 54317f8d4a4326ce886a70908e2a4d6878bbf592 Mon Sep 17 00:00:00 2001 From: gt199899 Date: Fri, 19 Aug 2016 14:07:29 +0800 Subject: [PATCH] =?UTF-8?q?dump=E5=87=BD=E6=95=B0=E4=B8=ADhtmlspecialchars?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=96=E7=A0=81=E8=AE=BE=E5=AE=9A=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=81=87=E5=88=B0=E4=B8=AD=E6=96=87=E9=9D=9E?= =?UTF-8?q?utf8=E7=BC=96=E7=A0=81=E6=97=A0=E8=BE=93=E5=87=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ThinkPHP/Common/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ThinkPHP/Common/functions.php b/ThinkPHP/Common/functions.php index b06dff8e7..d1fd2f842 100644 --- a/ThinkPHP/Common/functions.php +++ b/ThinkPHP/Common/functions.php @@ -919,7 +919,7 @@ function dump($var, $echo = true, $label = null, $strict = true) if (!$strict) { if (ini_get('html_errors')) { $output = print_r($var, true); - $output = '
' . $label . htmlspecialchars($output, ENT_QUOTES) . '
'; + $output = '
' . $label . htmlspecialchars($output, ENT_QUOTES, 'ISO-8859-1') . '
'; } else { $output = $label . print_r($var, true); } @@ -929,7 +929,7 @@ function dump($var, $echo = true, $label = null, $strict = true) $output = ob_get_clean(); if (!extension_loaded('xdebug')) { $output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', $output); - $output = '
' . $label . htmlspecialchars($output, ENT_QUOTES) . '
'; + $output = '
' . $label . htmlspecialchars($output, ENT_QUOTES, 'ISO-8859-1') . '
'; } } if ($echo) {