cvs: smarty / NEWS /libs/plugins modifier.escape.php

"Monte Ohrt" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmohrt1125419063@cvsserver>
mohrt		Tue Aug 30 12:24:23 2005 EDT

  Modified files:              
    /smarty	NEWS 
    /smarty/libs/plugins	modifier.escape.php 
  Log:
  add char_set param
  
  
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.513&r2=1.514&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.513 smarty/NEWS:1.514
--- smarty/NEWS:1.513	Wed Aug 17 11:27:40 2005
+++ smarty/NEWS	Tue Aug 30 12:24:22 2005
@@ -1,3 +1,4 @@
+ - add char_set parameter to escape modifier (Loading, monte)
  - fix notice in debug security check (Drakla, monte)
  - return valid reference in get_template_vars() when given var is
    non-existant (monte)
http://cvs.php.net/diff.php/smarty/libs/plugins/modifier.escape.php?r1=1.19&r2=1.20&ty=u
Index: smarty/libs/plugins/modifier.escape.php
diff -u smarty/libs/plugins/modifier.escape.php:1.19 smarty/libs/plugins/modifier.escape.php:1.20
--- smarty/libs/plugins/modifier.escape.php:1.19	Fri Aug 12 15:38:56 2005
+++ smarty/libs/plugins/modifier.escape.php	Tue Aug 30 12:24:22 2005
@@ -18,14 +18,14 @@
  * @param html|htmlall|url|quotes|hex|hexentity|javascript
  * @return string
  */
-function smarty_modifier_escape($string, $esc_type = 'html')
+function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'UTF-8')
 {
     switch ($esc_type) {
         case 'html':
-            return htmlspecialchars($string, ENT_QUOTES);
+            return htmlspecialchars($string, ENT_QUOTES, $char_set);
 
         case 'htmlall':
-            return htmlentities($string, ENT_QUOTES);
+            return htmlentities($string, ENT_QUOTES, $char_set);
 
         case 'url':
             return rawurlencode($string);

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.