【发布时间】:2015-03-02 12:44:05
【问题描述】:
我有这个用于 cmets 的 Wordpress 表单,非常标准:
<form action="http://sitename.com/wp-comments-post.php" target="writeIframe" method="post" id="commentform" class="comment-form">
<p class="comment-form-author">
<label for="author">Your name</label>
<input id="author" name="author" type="text" value="" size="30">
</p>
<p class="comment-form-comment">
<label for="comment">Comment</label>
<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>
</p>
<p class="form-submit">
<input name="submit" type="submit" id="submit" class="submit" value="Send">
<input type="hidden" name="comment_post_ID" value="1" id="comment_post_ID">
<input type="hidden" name="comment_parent" id="comment_parent" value="0">
</p>
</form>
它将用户输入数据发送到隐藏 iframe 内的 wp-cmets-post.php。这是开箱即用的 Wordpress 还是我应该添加代码以防止通过我的评论表单受到攻击?
【问题讨论】:
标签: wordpress forms validation comments