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.

Comments

dries’s picture

Confirmed that this is a bug that will need to be fixed.

marcelduchamp’s picture

Thanx

dave reid’s picture

Version: 6.x-1.7 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new4.51 KB

Tried 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.

dave reid’s picture

Assigned: Unassigned » dave reid

Here's the new source code of the CAPTCHA:

<div class="form-item" id="edit-mollom-captcha-wrapper">
 <label for="edit-mollom-captcha">Word verification: <span class="form-required" title="This field is required.">*</span></label>

 <span class="field-prefix"><a href="http://mollom.com" id="mollom-captcha"><img src="http://xmlrpc1.mollom.com:80/090326398c08fbcb97.png" alt="Mollom CAPTCHA" /></a> (<a href="#" id="mollom-audio-captcha">play audio CAPTCHA</a>)</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="090326398c08fbcb97"  />

Passes XHTML validation.

dries’s picture

Status: Needs review » Fixed

Committed to DRUPAL-6. Thanks Dave!

vladsavitsky’s picture

I have the same problem. When will be the next module release?

dries’s picture

It will be fixed in the next release of the module, yes.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.