Re: Allow special characters in HtmlHelper

2012-10-23 Thread bs28723
Thanks Chetan  Marcus.

On 10/23/2012 12:23 AM, chetan varshney [via CakePHP] wrote:

 Use this for example $imgTag = $this-Html-image($image['Image'] 
 ['thumb_path'], array( 'alt' = $title )); $options = array('class' = 
 'thumb', 'name' = trim(Inflector::slug($title)), 'title' = 
 trim($title), 'escape'=false);

 echo $this-Html-link($imgTag, $this-Html-url($image['Image'] 
 ['small_path'],true), $options);

 -- 
 Like Us on FaceBook 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 [hidden email] 
 /user/SendEmail.jtp?type=nodenode=5711913i=0.
 To unsubscribe from this group, send email to [hidden email] 
 /user/SendEmail.jtp?type=nodenode=5711913i=1.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.




 
 If you reply to this email, your message will be added to the 
 discussion below:
 http://cakephp.1045679.n5.nabble.com/Allow-special-characters-in-HtmlHelper-tp5711911p5711913.html
  

 To start a new topic under CakePHP, email 
 ml-node+s1045679n125572...@n5.nabble.com
 To unsubscribe from CakePHP, click here 
 http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1255722code=YmlsbC5zdG9sdHpAYm9vc3RlcndlYnNvbHV0aW9ucy5jb218MTI1NTcyMnwtNTU0NTk2MTUy.
 NAML 
 http://cakephp.1045679.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
  






--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Allow-special-characters-in-HtmlHelper-tp5711911p5711922.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Like Us on FaceBook 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+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Allow special characters in HtmlHelper

2012-10-23 Thread gimmebucks
setting 'url' options in image can do the trick too.
 $this-Html-image($image['Image']['thumb_path'], array( 'alt' = $title 
,'url' = $yoururl));

On Tuesday, 23 October 2012 12:08:13 UTC+8, bs28723 wrote:

 I would like to use Html-image and Html-link together, but Html-link 
 will convert characters like , , etc to htmlize them.

 for example 
 $imgTag = $this-Html-image($image['Image']['thumb_path'], 
 array( 'alt' = $title ));
 $options = array('class' = 'thumb', 'name' = 
 trim(Inflector::slug($title)), 'title' = trim($title));
 
echo $this-Html-link($imgTag, 
 $this-Html-url($image['Image']['small_path'],true), $options);

 Will actually produce 

 a href=/2d3cf4770eefa1244464b0371009c2b0_resized_250x188.jpg class=thumb 
 name=tree title=tree 
 lt;img src=quot;/2d3cf4770eefa1244464b0371009c2b0_resized_100x75.jpgquot; 
 alt=quot;tree quot; /gt;/a

 Yes the lt; etc is really in the file, so the image does not get recognized 
 by the browser as HTML. But it just gets displayed as text.

 Any way to get the Html-link to not convert the string?
 Or do I need to just build this manually?



 --
 View this message in context: Allow special characters in 
 HtmlHelperhttp://cakephp.1045679.n5.nabble.com/Allow-special-characters-in-HtmlHelper-tp5711911.html
 Sent from the CakePHP mailing list 
 archivehttp://cakephp.1045679.n5.nabble.com/at Nabble.com.


-- 
Like Us on FaceBook 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+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Allow special characters in HtmlHelper

2012-10-22 Thread bs28723

  


  
  
I would like to use Html-gt;image and Html-gt;link together, but
Html-gt;link will convert characters like lt;, , etc to htmlize
them. 

for example 
nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; $imgTag =
$this-gt;Html-gt;image($image['Image']['thumb_path'], array( 'alt'
=gt; $title )); 
nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
$options = array('class' =gt; 'thumb', 'name' =gt;
trim(Inflector::slug($title)), 'title' =gt; trim($title)); 
nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 
nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp; echo 
$this-gt;Html-gt;link($imgTag,
$this-gt;Html-gt;url($image['Image']['small_path'],true),
$options); 

Will actually produce 

lt;a href=/2d3cf4770eefa1244464b0371009c2b0_resized_250x188.jpg class= 
thumb  name= tree  title= tree gt;
amp;lt;img 
src=amp;quot;/2d3cf4770eefa1244464b0371009c2b0_resized_100x75.jpgamp;quot; 
alt=amp;quot;tree amp;quot; /amp;gt;lt;/agt;

Yes the amp;lt; etc is really in the file, so the image does not get 
recognized by the browser as HTML. But it just gets displayed as text.

Any way to get the Html-gt;link to not convert the string?
Or do I need to just build this manually?


  





--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Allow-special-characters-in-HtmlHelper-tp5711911.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Like Us on FaceBook 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+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Allow special characters in HtmlHelper

2012-10-22 Thread Chetan Varshney
Use this for example $imgTag = $this-Html-image($image['Image']
['thumb_path'], array( 'alt' = $title )); $options = array('class' =
'thumb', 'name' = trim(Inflector::slug($title)), 'title' = trim($title),
'escape'=false);

echo $this-Html-link($imgTag, $this-Html-url($image['Image']
['small_path'],true), $options);

-- 
Like Us on FaceBook 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+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.