| | 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 | /** |
|---|