I was having a problem getting reCAPTCHA to validate as XHTML strict, on one of the plugins that I swear by which is gravity forms.
Thought I would share it with you.
The problem is that iframes do not validate…
So open up your recaptchalib.php that comes with your plugin or that you downloaded from reCAPTCHA yourself.
Please as always remember to make a backup copy before you apply any changes or edits….
find around line 121
<noscript>
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>
and replace with
<noscript>
<div id="no_js_recaptcha">
<object type="text/html" data="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" width="500" height="300"></object>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
<!--[if IE]>
<iframe width="500" height="300" frameborder="0" src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '"></iframe>
< ![endif]--></div>
</noscript>
Save your recaptchalib.php and upload and sit back knowing that your reCAPTCHA now validates as XHTML 1.0 Strict!
For those of you who do not use or know of Gravity Forms go and check them out






Thank you so much! Works great!
No problems, pleased this was of help and that other people take validation seriously aswell..