HtmlHelper and Umlauts
Hello, I have an issue with the htmlHelper: If I want to insert an Image with an alternative text I use ?php echo $html-image('path/to/image.jpg', array('alt' = 'My alt text'); ? This works fine as long as the alt text does not include any umlaut. With an '' in it it works fine: it is translated to 'amp;'. But a German umlaut 'ü' is not translated but alt text is empty (which seems to be a problem of htmlspecialchars with UTF-8. Any idea of a solution for this problem? --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: HtmlHelper and Umlauts
I had to go digging through the core code for this one. ?php echo $html-image('image.jpg', array('alt' = 'euml;', 'escape' = false));? Seems to work. -Corie On Feb 28, 12:45 pm, Kuje m...@jenskuttig.de wrote: Hello, I have an issue with the htmlHelper: If I want to insert an Image with an alternative text I use ?php echo $html-image('path/to/image.jpg', array('alt' = 'My alt text'); ? This works fine as long as the alt text does not include any umlaut. With an '' in it it works fine: it is translated to 'amp;'. But a German umlaut 'ü' is not translated but alt text is empty (which seems to be a problem of htmlspecialchars with UTF-8. Any idea of a solution for this problem? --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: HtmlHelper and Umlauts
On Feb 28, 6:45 pm, Kuje m...@jenskuttig.de wrote: Hello, I have an issue with the htmlHelper: If I want to insert an Image with an alternative text I use ?php echo $html-image('path/to/image.jpg', array('alt' = 'My alt text'); ? This works fine as long as the alt text does not include any umlaut. With an '' in it it works fine: it is translated to 'amp;'. But a German umlaut 'ü' is not translated but alt text is empty (which seems to be a problem of htmlspecialchars with UTF-8. Any idea of a solution for this problem? What problem. What does German umlaut 'ü' is not translated mean? echo $html-link('x', '/', array('alt' = 'Ü')); ... a alt=Ü href=/x/a --~--~-~--~~~---~--~~ 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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---