更新时间:2023-11-14 15:14:40
您正在输出到HTML上下文中,因此需要特定于html的转义:
You're outputting into an HTML context, so you need html-specific escaping:
<input ... value="<?php echo htmlspecialchars(json_encode($whatever)); ?>" />
^^^^^^^^^^^^^^^^----