There is a problem with output in yii. CHtml :: encode ($ text) displays everything in one line. If you apply nl2br and output simply: echo nl2br ($ text), then everything is OK. But then the user will be able to enter tags. If CHtml :: encode (nl2br ($ text)) - it is logical that it will output in one line, but with tags.
How to solve the problem without too much parsing?