- htmlspecialchars: documentation ( source)
- define: documentation ( source)
<?php
define('APP_CHARSET', 'UTF-8');
function hq($input) {
return htmlspecialchars($input, ENT_QUOTES, APP_CHARSET, false);
}
echo 'var x = tTest|', hq('C:\\tèst') ,'|test"';