Displaying "&" instead of "&" in View file using CDetailView. I have a database with a varchar2 field that has an "&" in it, example: "Mom & Pop". It gets displayed as "Mom & Pop".
I used gii to create. In the view.php is the following.
I’m not sure if this is a database issue or how it is being displayed using CHtml.
Your answer is simple
If you follow the link you find there, you’ll read:
I read through the link you gave me and tried using "decode" instead of "encode" and that worked.
Not sure if that is what you meant but it worked.
I also tried
but that didn’t work. Not sure where the “html_specialchars” goes.
I previously had tried " ‘filter’, ‘filter’=>‘html_entity_decode’ " in rules section but that didn’t do anything.
I’m new to using frameworks and object oriented coding. So far I really like this one.