This commit is contained in:
Gregory Letellier
2023-11-08 16:59:13 +01:00
commit 80aeacdade
19 changed files with 5673 additions and 0 deletions

15
src/helpers.php Normal file
View File

@@ -0,0 +1,15 @@
<?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);
}
}