您好,我目前正在使用表格将值输入到自定义元字段中。我有一个名为剧集标题的文本框。我的问题是,如果在字段中添加字符“”,那么一切都会变得混乱。我想使用 htmlspecialchars 将值输入为 " 和 ' 而不是“”。以下代码无法隐藏字符。有人可以帮忙吗?
<p>
<input type="text" name="episode_title[]" id="episode_title[]" value="<?php echo ($_POST['episode_title']); ?>" class="title regular-text" style="width: 98%" />
<span class="description"><?php _e('Title of The Episode.'); ?></span>
</p>