Yii: How can I linkify all URLs in some text?

Say I have a forum thread and I want to make all mentioned URLs as clickable links. How can I accomplish this in Yii?


You can try CHtmlPurifier if you don’t want to write custom code for this feature. Relevant configuration options can be found here.

If you are able to install PECL packages, you might want to consider PECL::bbcode.