cvs: smarty / NEWS /libs/plugins modifier.escape.php
"Monte Ohrt" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmohrt1086792871@cvsserver> |
mohrt Wed Jun 9 10:54:31 2004 EDT
Modified files:
/smarty NEWS
/smarty/libs/plugins modifier.escape.php
Log:
added escapement of '</' to javascript escaping
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.454&r2=1.455&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.454 smarty/NEWS:1.455
--- smarty/NEWS:1.454 Fri May 28 04:44:45 2004
+++ smarty/NEWS Wed Jun 9 10:54:30 2004
@@ -1,3 +1,5 @@
+ - added escapement of '</' to '<\/' in escape:javascript
+ modifier (c960657, Monte)
- added obfuscation of protocol-string in {mailto} when using hex-
encoding (bharat, messju)
- enhanced auto-generated filenames for templates_c and cache (messju)
http://cvs.php.net/diff.php/smarty/libs/plugins/modifier.escape.php?r1=1.16&r2=1.17&ty=u
Index: smarty/libs/plugins/modifier.escape.php
diff -u smarty/libs/plugins/modifier.escape.php:1.16 smarty/libs/plugins/modifier.escape.php:1.17
--- smarty/libs/plugins/modifier.escape.php:1.16 Wed May 12 15:40:36 2004
+++ smarty/libs/plugins/modifier.escape.php Wed Jun 9 10:54:31 2004
@@ -57,8 +57,8 @@
return $return;
case 'javascript':
- // escape quotes and backslashes and newlines
- return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n'));
+ // escape quotes and backslashes, newlines, etc.
+ return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
case 'mail':
// safe way to display e-mail address on a web page
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php