Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Comments, trackbacks & pings (http://forum.bytesforall.com/forumdisplay.php?f=19)
-   -   XHTML Strict Validation Error, Possibly from comments.php (http://forum.bytesforall.com/showthread.php?t=3360)

cyboc Sep 9, 2009 01:57 PM

XHTML Strict Validation Error, Possibly from comments.php
 
I'm running Wordpress 2.8.4 with Atahualpa 3.4.1. I'm getting XHTML strict validation errors on http://validator.w3.org, which seem to be related to comments.php. Here's the error:

Quote:

Error Line 501, Column 112: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

…d_html_comment" value="a6b33afe5f"
I traced that to this snippet of XHTML:
HTML Code:

<!-- Comment Textarea -->
<p><textarea name="comment" id="comment" rows="10" cols="10" tabindex="4"></textarea></p>
<input type="hidden" id="_wp_unfiltered_html_comment" name="_wp_unfiltered_html_comment" value="a6b33afe5f" />
...               
<!-- Submit -->
...

That XHTML seems to be generated by this php snippet in the theme's comments.php:
PHP Code:

<!-- Comment Textarea -->
<p><textarea name="comment" id="comment" rows="10" cols="10" tabindex="4"></textarea></p>
<?php do_action('comment_form'$post->ID); ?>

<!-- Submit -->

I think the generated "input" element needs to be wrapped with a block element such as "p", "div", "fieldset", etc. I think either comments.php should wrap "<?php do_action('comment_form', $post->ID); ?>" with such an element or the do_action code should do it.

What is the best workaround for now?


All times are GMT -6. The time now is 12:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.