yiisoft/yii2 — pull request #3518 by DaSourcerer (2014-05-20 13:54:14+00:00)
Title: Handle invalid code sequences in Html::encode()

As described in [this blog post](http://nikic.github.io/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html), PHP 5.4 introduced a new flag to `htmlspecialchars()` allowing invalid code sequences being replaced by � (REPLACEMENT CHARACTER).

Accepting this PR will highten security of Yii 2 apps and bring the framework closer to the recommendations found in the [Unicode Security Considerations](http://unicode.org/reports/tr36/#Some_Output_For_All_Input).