|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
the-styler Smarty Rookie
Joined: 12 Jul 2004 Posts: 25
|
Posted: Tue Jul 13, 2004 3:11 pm Post subject: htmlenties und unicode |
|
|
gibt es eine funktion die den gleichen zweck hat wie htmlenties in php auch in smarty?
und irgendwo habe ich eine funktion gesehen, die meine variable in den unicode umwandelt. kann mir einer helfen?
ach ja und kann ich mehrere auf eine variable anwenden. in php kann ich sie ja verschachteln geht das in smarty auch? wenn ja wie? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Jul 13, 2004 3:49 pm Post subject: Re: htmlenties und unicode |
|
|
the-styler wrote: | gibt es eine funktion die den gleichen zweck hat wie htmlenties in php auch in smarty? |
http://smarty.php.net/escape
Quote: | und irgendwo habe ich eine funktion gesehen, die meine variable in den unicode umwandelt. kann mir einer helfen? |
du kannst php-funktionen als modifier einsetzen:
{$var|utf_encode}
Quote: | ach ja und kann ich mehrere auf eine variable anwenden. in php kann ich sie ja verschachteln geht das in smarty auch? wenn ja wie? |
ja, du kannst die modifier einfach aneinander hängen:
{$var|utf8_decode|escape:javascript|strtoupper} |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|