Re: [SMARTY-GENERAL] Escape modifier: patch
| From: | Monte Ohrt | Date: | Wed, 03 Apr 2002 14:26:45 +0000 |
| Subject: | Re: [SMARTY-GENERAL] Escape modifier: patch | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3456@lists.php.net to get a copy of this message | ||
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.