Yii Framework Forum: [solved] How to show HTML characters correctly - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[solved] How to show HTML characters correctly Rate Topic: -----

#1 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 06 May 2010 - 06:23 AM

Hello,

In default CRUD View.php I have tried to user some HTML Char like √ (same with > < & ):
		array(
            'name'=>'CrMon',
            'value'=>$model->CrMon?'√':'',
        ),


But how do I successfully do this because it just put the echo like √ instead of right symbol in view.

Thanks
CoLT
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 06 May 2010 - 06:59 AM

try with
   array(
     'name'=>'CrMon',
     'type'=>'raw',
     'value'=>$model->CrMon?'&radic;':'',
   ),


by default 'type' is text and is HTML encoded...
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 06 May 2010 - 08:02 AM

View Postmdomba, on 06 May 2010 - 06:59 AM, said:

try with
   array(
     'name'=>'CrMon',
     'type'=>'raw',
     'value'=>$model->CrMon?'&radic;':'',
   ),


by default 'type' is text and is HTML encoded...


Thanks it helped me out!
;)

CoLT
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users