Error found while checking this document as XHTML 1.0 Transitional!
I'm using Mollom's Captcha on user/password page of my drupal site and I get an error when passing the W3C Markup Validation Test...
<form action="/user/password" accept-charset="UTF-8" method="post" id="user-pass">
<div><div class="form-item" id="edit-name-wrapper">
<label for="edit-name">Nom d'utilisateur ou adresse e-mail. : <span class="form-required" title="Ce champ est obligatoire.">*</span></label>
<input type="text" maxlength="64" name="name" id="edit-name" size="60" value="" class="form-text required" />
</div>
<input type="hidden" name="form_build_id" id="form-XXXXXXXXXXX" value="form-XXXXXXXXXXX" />
<input type="hidden" name="form_id" id="edit-user-pass" value="user_pass" />
<div class="form-item" id="edit-mollom-captcha-wrapper">
<label for="edit-mollom-captcha">Word verification : <span class="form-required" title="Ce champ est obligatoire.">*</span></label>
<span class="field-prefix"><div id="captcha"><a href="http://mollom.com"><img src="http://xmlrpc1.mollom.com:80/XXXXXXXXX.png" alt="Mollom CAPTCHA" /></a> (<a href="#" id="audio-captcha">play audio CAPTCHA</a>)</div></span> <input type="text" maxlength="128" name="mollom[captcha]" id="edit-mollom-captcha" size="10" value="" class="form-text required" />
<div class="description">Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated.</div>
</div>
<input type="hidden" name="mollom[session_id]" id="edit-mollom-session-id" value="XXXXXXXXXXX" />
<input type="submit" name="op" id="edit-submit" value="Transmettre le nouveau mot de passe par e-mail" class="form-submit" />
</div>
</form>
Error is here :
<span class="field-prefix"><div id="captcha"><a href="http://mollom.com"><img src="http://xmlrpc1.mollom.com:80/83a254c52f91690a.png" alt="Mollom CAPTCHA" /></a> (<a href="#" id="audio-captcha">play audio CAPTCHA</a>)</div></span>
a <div> is in a <span> ! You can't put a block-level element inside an inline element...
Hope this will be changed for the next release of mollom's module ;
I don't know if I can change it manually, I don't want to disturb Mollom which is working good in spite of this little issue...
Somebody has an idea ?
Thank you.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 380502-mollom-captcha-html-validation-D6.patch | 4.51 KB | dave reid |
Comments
Comment #1
dries commentedConfirmed that this is a bug that will need to be fixed.
Comment #2
marcelduchamp commentedThanx
Comment #3
dave reidTried a stab at this and it's working as expected. Required adding a new (and very short) mollom.css file, which probably isn't such a bad idea in case we need it for any other styling issues in the future.
Comment #4
dave reidHere's the new source code of the CAPTCHA:
Passes XHTML validation.
Comment #5
dries commentedCommitted to DRUPAL-6. Thanks Dave!
Comment #6
vladsavitsky commentedI have the same problem. When will be the next module release?
Comment #7
dries commentedIt will be fixed in the next release of the module, yes.