cvs: smarty / NEWS /libs/plugins modifier.escape.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1082104843@cvsserver> |
messju Fri Apr 16 04:40:43 2004 EDT
Modified files:
/smarty NEWS
/smarty/libs/plugins modifier.escape.php
Log:
added escape type "decentity" to smarty_modifier_escape()
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.446&r2=1.447&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.446 smarty/NEWS:1.447
--- smarty/NEWS:1.446 Thu Apr 15 11:06:08 2004
+++ smarty/NEWS Fri Apr 16 04:40:42 2004
@@ -1,3 +1,5 @@
+ - add case decentity to smarty_modifier_escape() (Konstantin A. Pelepelin,
+ messju)
- make smarty_core_write_compiled_include() php5-aware (messju)
- removed unused functionality to load a subset of lines from a file (messju)
- fix is_secure() should only check if a file is_readable, not if
http://cvs.php.net/diff.php/smarty/libs/plugins/modifier.escape.php?r1=1.13&r2=1.14&ty=u
Index: smarty/libs/plugins/modifier.escape.php
diff -u smarty/libs/plugins/modifier.escape.php:1.13 smarty/libs/plugins/modifier.escape.php:1.14
--- smarty/libs/plugins/modifier.escape.php:1.13 Fri Apr 16 04:00:51 2004
+++ smarty/libs/plugins/modifier.escape.php Fri Apr 16 04:40:42 2004
@@ -49,6 +49,13 @@
}
return $return;
+ case 'decentity':
+ $return = '';
+ for ($x=0; $x < strlen($string); $x++) {
+ $return .= '&#' . ord($string[$x]) . ';';
+ }
+ return $return;
+
case 'javascript':
// escape quotes and backslashes and newlines
return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n'));
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php