Init
This commit is contained in:
15
src/helpers.php
Normal file
15
src/helpers.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user