mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Merge branch 'master' into sync-master-2052.
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
@ -181,7 +180,7 @@ class ErrorHandler extends \yii\base\ErrorHandler
|
||||
*/
|
||||
public function htmlEncode($text)
|
||||
{
|
||||
return htmlspecialchars($text, ENT_NOQUOTES | ENT_SUBSTITUTE | ENT_HTML5, 'UTF-8');
|
||||
return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, 'UTF-8');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -204,7 +203,7 @@ class ErrorHandler extends \yii\base\ErrorHandler
|
||||
$url = null;
|
||||
|
||||
$shouldGenerateLink = true;
|
||||
if ($method !== null && substr_compare($method, '{closure}', -9) !== 0) {
|
||||
if ($method !== null && strpos($method, '{closure') === false) {
|
||||
$reflection = new \ReflectionClass($class);
|
||||
if ($reflection->hasMethod($method)) {
|
||||
$reflectionMethod = $reflection->getMethod($method);
|
||||
|
Reference in New Issue
Block a user