Browse Source

encode email in Formatter

avoid XSS with emails in format  "Carsten Brandt <mail@cebe.cc>"
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
f3ab5d999b
  1. 2
      framework/yii/base/Formatter.php

2
framework/yii/base/Formatter.php

@ -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);
} }
/** /**

Loading…
Cancel
Save