G
G
Grigory Vashkevich2014-10-09 11:11:30
Yii
Grigory Vashkevich, 2014-10-09 11:11:30

How to convert text to html?

Hello. Help solve the problem.
I built CKEditor into the site with yii 1.x. He writes text to the database along with html tags. How can I get the content from the database and convert it to html?
I found that the encode () method of the CHtml class is used for this, but for some reason it does not work.
Moreover, it works on one page, but not on the other ... What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Grechushnikov, 2014-10-09
@maxyc_webber

how do you insert it into the database?

S
Sergey, 2014-10-09
@TsarS

Uh-uh, so his whole point is that he must write to the database along with html tags?
And when, later, you call $model->content - everything is rendered with markup.
Or I did not understand the task?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question