|
@@ 231-237 (lines=7) @@
|
| 228 |
|
* @param bool $double_encode |
| 229 |
|
* @return string |
| 230 |
|
*/ |
| 231 |
|
function spip_htmlspecialchars($string, $flags = null, $encoding = 'ISO-8859-1', $double_encode = true) { |
| 232 |
|
if (is_null($flags)) { |
| 233 |
|
$flags = ENT_COMPAT|ENT_HTML401; |
| 234 |
|
} |
| 235 |
|
|
| 236 |
|
return htmlspecialchars($string, $flags, $encoding, $double_encode); |
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
/** |
| 240 |
|
* htmlentities wrapper (PHP >= 5.4 compat issue) |
|
@@ 248-254 (lines=7) @@
|
| 245 |
|
* @param bool $double_encode |
| 246 |
|
* @return string |
| 247 |
|
*/ |
| 248 |
|
function spip_htmlentities($string, $flags = null, $encoding = 'ISO-8859-1', $double_encode = true) { |
| 249 |
|
if (is_null($flags)) { |
| 250 |
|
$flags = ENT_COMPAT|ENT_HTML401; |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
return htmlentities($string, $flags, $encoding, $double_encode); |
| 254 |
|
} |
| 255 |
|
|