RE: [SMARTY-GENERAL] Escape modifier: patch
| From: | Artem Orlov | Date: | Fri, 04 Apr 2008 05:04:28 +0000 |
| Subject: | RE: [SMARTY-GENERAL] Escape modifier: patch | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3478@lists.php.net to get a copy of this message | ||
Hi,
This patch whil be bad for international users, if you use
htmlspecialchars - only critical characters replaced,
with htmlentities - all non englsih chars. Example: I have a string (or
a whole page) in Russian, after htmlentities it size grow 5 times,
This bad for users of site.
______________________________________________
Artem Orlov http://design.ural.ru
> -----Original Message-----
> From: Monte Ohrt [mailto:monte@ispi.net]
> Sent: Wednesday, April 03, 2002 8:27 PM
> To: Raymond Penners
> Cc: smarty-general@lists.php.net
> Subject: Re: [SMARTY-GENERAL] Escape modifier: patch
>
>
> Does anyone object to using htmlentities over htmlspecialchars? I can
> see some possible backward compatability issues since it
> wouldn't have
> the same behavior. Another option is to pass a new attribute that
> determines whether to use htmlentities or htmlspecialchars.
>
>
> Raymond Penners wrote:
> > Hi,
> >
> > It would be nice if the escape modifier transformed u-umlauts into
> > "ü", and so on. I've attached a patch that enables this
> > functionality. Would you guys accept this patch, or do I
> need to fork a
> > new modifier for this?
> >
> > Thanks,
> > --
> > Raymond Penners -*- http://www.dotsphinx.com
> >
> >
> >
> ----------------------------------------------------------------------
> > --
> >
> > --- modifier.escape.php.orig Wed Apr 3 14:09:00 2002
> > +++ modifier.escape.php Wed Apr 3 14:09:08 2002
> > @@ -12,7 +12,7 @@
> > {
> > switch ($esc_type) {
> > case 'html':
> > - return htmlspecialchars($string, ENT_QUOTES);
> > + return htmlentities($string, ENT_QUOTES);
> >
> > case 'url':
> > return urlencode($string);
> >
> >
>
>
>
> --
> Monte Ohrt <monte@ispi.net>
> Director of Technology, ispi Inc.
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>