I’m using $this->title inside of view files and it seems something is automatically encoding the data into html entities, is Yii doing this somehow itself?
I’m using $this->title inside of view files and it seems something is automatically encoding the data into html entities, is Yii doing this somehow itself?
Yes…
use yii\helpers\Html;
echo Html::encode($myOutputVariable);
The title gets encoded in the layout file:
app/views/layouts/main.php
There is this part which encodes the title.
<title><?= Html::encode($this->title) ?></title>
Regards
Ahhh thanks, I must of missed that.
Cheers!