Files
miniweb/src/helpers.php
Gregory Letellier 80aeacdade Init
2023-11-08 16:59:13 +01:00

16 lines
361 B
PHP

<?php
if (! function_exists('e')) {
/**
* Encode HTML special characters in a string.
*
* @param string|null $value
* @param bool $doubleEncode
* @return string
*/
function e($value, $doubleEncode = true)
{
return htmlspecialchars($value ?? '', ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8', $doubleEncode);
}
}