$str1 = '<h1>他是\'一个 有"故事"的人</h1>';
//不转义输出
echo '不转义输出:',$str1, '<br>';
//正常转义: ',",&,<,>
echo '正常转义:', htmlspecialchars($str1), '<hr>';