Page 1 of 1

XHTL Validation errors for recaptcha plugin

Posted: Wed Dec 03, 2008 10:34 pm
by sonichouse
The validator was failing my comment pages, so I made the following changes.

In serendipity_event_recaptcha/recaptcha/recaptchalib.php in function recaptcha_get_html

Code: Select all

<noscript>
		<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br>
		<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
		<input type="hidden" name="recaptcha_response_field" value="manual_challenge">
</noscript> ';
needs to be

Code: Select all

<noscript>
		<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br />
		<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
		<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript> ';
In serendipity_event_recaptcha/serendipity_event_recaptcha.php:

Code: Select all

echo "\n<script>\n var RecaptchaOptions = { theme : '".$theme."', lang : '" . $serendipity['lang'] . "' };\n</script>";
we need to supply the script type

Code: Select all

echo "\n".'<script type="text/javascript">';
echo "\n var RecaptchaOptions = { theme : '".$theme."', lang : '" . $serendipity['lang'] . "' };\n</script>";

Re: XHTL Validation errors for recaptcha plugin

Posted: Thu Dec 04, 2008 11:34 am
by garvinhicking
Hi!

Thanks for that patch, committed.

Regards,
Garvin

Posted: Thu Dec 04, 2008 3:42 pm
by Don Chambers
Steve's on a roll lately!!! Keep up the great work!