#AskYii: Yii::app()->CreateUrl generates & instead of &. How can I fix this? | #Yii
Updated July 12, 2013 ● 993 views
Yii channell is about Yii PHP Framework. Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, dry design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product.
If you are a fellow Yii developer, join us! Do not hesitate to share your ideas. If you have a Yii product, you are welcome to share your creation here.
Check out Yii Framework official website.
I was checking my link trough W3C validator and it give me an error saying:
& did not start a character reference. (& probably should have been escaped as &.)
But this is what Yii::app()->CreateUrl generated. How can I fix this to change & to &?
You can use CHtml::link(). This generates a hyperlink tag and encodes & to &.
permalink · reply (1)
@DevGuru1: Thank you... it works now!
Prakash1 · 11 years agopermalink · reply