您是否必须对 <textarea>
中的输出进行转义或清理? ?
似乎如果我使用 htmlentities()
对其进行 sanitizer 实际上 &...;出现字符替换
最佳答案
那么,你必须:
<?php
$content = "</textarea><script>alert('hi!')</script>";
?>
<textarea>
<?php echo $content; ?>
</textarea>
关于php - 需要转义或清理显示在 <textarea> 中的输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13371421/