Source for file modifier.escape.php
Documentation is available at modifier.escape.php
* Smarty escape modifier plugin
* Purpose: Escape the string according to escapement type
* @link http://smarty.php.net/manual/en/language.modifier.escape.php
* escape (Smarty online manual)
* @param html|htmlall|url|quotes|hex|hexentity|javascript
// escape unescaped single quotes
// escape every character into hex
for ($x=0; $x < strlen($string); $x++ ) {
$return .= '%' . bin2hex($string[$x]);
for ($x=0; $x < strlen($string); $x++ ) {
$return .= '&#x' . bin2hex($string[$x]) . ';';
// escape quotes and backslashes and newlines
return strtr($string, array ('\\'=> '\\\\',"'"=> "\\'",'"'=> '\\"',"\r"=> '\\r',"\n"=> '\\n'));
/* vim: set expandtab: */
Documentation generated on Mon, 25 Jun 2007 14:03:30 -0400 by phpDocumentor 1.3.2. PEAR Logo Copyright © PHP Group 2004.
|