Changeset 6099
- Timestamp:
- 11/18/07 17:27:43 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/plugins/sfCompat10Plugin/lib/helper/EscapingHelper.php
r2669 r6099 48 48 49 49 /** 50 * Runs the PHP function htmlspecialchars on the value passed. 51 * 52 * @param string $value the value to escape 53 * @return string the escaped value 54 */ 55 function esc_htmlspecialchars($value) 56 { 57 // Numbers and boolean values get turned into strings which can cause problems 58 // with type comparisons (e.g. === or is_int() etc). 59 return is_string($value) ? htmlspecialchars($value, ENT_QUOTES, sfConfig::get('sf_charset')) : $value; 60 } 61 62 define('ESC_HTMLSPECIALCHARS', 'esc_htmlspecialchars'); 63 64 /** 50 65 * An identity function that merely returns that which it is given, the purpose 51 66 * being to be able to specify that the value is not to be escaped in any way.

