sanitizeFilename($filename);
}
}
//--------------------------------------------------------------------
if (! function_exists('strip_image_tags'))
{
/**
* Strip Image Tags
*
* @param string $str
* @return string
*/
function strip_image_tags(string $str): string
{
return preg_replace([
'#
#i',
'#
`]+)).*?\>#i',
], '\\2', $str
);
}
}
//--------------------------------------------------------------------
if (! function_exists('encode_php_tags'))
{
/**
* Convert PHP tags to entities
*
* @param string $str
* @return string
*/
function encode_php_tags(string $str): string
{
return str_replace(['', '?>'], ['<?', '?>'], $str);
}
}
//--------------------------------------------------------------------