mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fixes #16648: Html::strtolower() was corrupting UTF-8 strings
This commit is contained in:
committed by
Alexander Makarov
parent
383953d9b7
commit
06227c7075
@ -2295,7 +2295,8 @@ class BaseHtml
|
||||
*/
|
||||
public static function getInputId($model, $attribute)
|
||||
{
|
||||
$name = strtolower(static::getInputName($model, $attribute));
|
||||
$charset = Yii::$app ? Yii::$app->charset : 'UTF-8';
|
||||
$name = mb_strtolower(static::getInputName($model, $attribute), $charset);
|
||||
return str_replace(['[]', '][', '[', ']', ' ', '.'], ['', '-', '-', '', '-', '-'], $name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user