return $output;
} /**
* @psalm-param Encoding $encoding
*
* @param mixed $encoding
*/
public function escape(string
$string,
$encoding = false
): string
{ if (false ===
$encoding) { $encoding = BlobValue::
detectEncoding($string);
} $original_encoding =
$encoding;
if (false ===
$encoding || 'ASCII' ===
$encoding) { $encoding = 'UTF-8';
} $string = \
htmlspecialchars($string, ENT_NOQUOTES,
$encoding);
// this call converts all non-ASCII characters into numeirc htmlentities