Sunday, September 30, 2012

Re: getting < , " instead < , " in output

hi Yasir,... 
I have php tag in my views,.... 

<?php echo $this->Html->link($this->PhotoShow->thumb($user_obj), '/photos/index/' . $user_obj['User']['username'], false, false, false) ?>

and I have this code in my photo_show helper: 


  function show($photo, $size, $params = array())
  {
    $name = array_key_exists('Photo', $photo) ? $photo['Photo']['name'] : '';
    $s = '<img src="' . $this->show_path($photo, $size, $params) . '" alt="' . (array_key_exists('alt', $params) ? $params['alt'] : $name) . '"';
    $s .= array_key_exists('width', $params) ? ' width="' . $params['width'] . '"' : '';
    $s .= array_key_exists('height', $params) ? ' height="' . $params['height'] . '"' : '';
    $s .= array_key_exists('style', $params) ? ' style="' . $params['style'] . '"' : '';
    $s .= array_key_exists('id', $params) ? ' id="' . $params['id'] . '"' : '';
    $s .= ' />';
    return $s;
  }
  
and output on CAKE1.2 pre-Beta version works fine,... but now migration to CAKE1.3 and I'm getting this in my view: 

from document souse: 
<a href="/photos/index/admin">&lt;img src=&quot;/photos/thumb/0-.jpg&quot; alt=&quot;&quot; /&gt;</a>
and in a browser:

???
getting frustrated ....

thanks in advance,...

chris


On Sunday, September 30, 2012 7:02:00 PM UTC-7, Yasir Arafat wrote:
May be you did not start PHP tag?

On Mon, Oct 1, 2012 at 2:51 AM, Chris <chri...@yahoo.com> wrote:
hi guys,... I'm getting getting &lt; , &quot; instead < , " in output (views) when reading from helper,... e.g. 

    $s = '<img src="' . $this->show_path($photo, $size, $params) . '" alt="' . (array_key_exists('alt', $params) ? $params['alt'] : $name) . '"'; 

can some one tell me what's wrong with it,...?? 

--
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake...@googlegroups.com.
To unsubscribe from this group, send email to cake-php+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 



--
Thanks & Regards.
-----------------------------------------------------------------------------------------------------------------------------
Yasir Arafat (Hasib)
Deputy Project Manager, Software Solutions
Grameen Solutions
Contact Information:
Cell : +8801816 536 901, +880197 333 2 888
Web: http://arafats.info

--
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: