mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-26 20:00:06 +08:00
encode email in Formatter
avoid XSS with emails in format "Carsten Brandt <mail@cebe.cc>"
This commit is contained in:
@@ -190,7 +190,7 @@ class Formatter extends Component
|
|||||||
if ($value === null) {
|
if ($value === null) {
|
||||||
return $this->nullDisplay;
|
return $this->nullDisplay;
|
||||||
}
|
}
|
||||||
return Html::mailto($value);
|
return Html::mailto(Html::encode($value), $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user