Label not validating in xhtml from Add Resource

Label not validating in xhtml from Add Resource

by Deleted user -
Number of replies: 2

Hi, I've seen the previous reports on invalid markups with labels and activites but  having problems on validation from the Add Resouce.

1.9.5 Build:20090513 as of today 26/06/09.

<span class="label"><div class="cssbox"> document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag

Essentially this is a label from 'Add Resource' dropdown and with the content being added as code that includes css.

code within the label area will start as:

<div class="cssbox">

<h3>Notices</h3>  etc

Regards

Gerald

Average of ratings: -
In reply to Deleted user

Re: Label not validating in xhtml from Add Resource

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
What is it you are wanting to add to this label? And why does it absolutely need to be valid?
In reply to Mary Cooch

Re: Label not validating in xhtml from Add Resource

by Deleted user -

This is my content put into the label html content box using the toggle html button:

<div class="cssbox">
  <div class="cssbox_head">
    <h2><strong>Notices</strong></h2></div>
  <div class="cssbox_body">

This is W3C XHTML Strict 1.0 validated in Moodle 1.9.3 but the same code brings up a W3C validation error in Moodle 1.9.5 and probably will in Moodle 2 as well.

W3C is reporting the error because of the <span class="label"> added to the start of my label content by Moodle.

Source code 1.9.3:

<li class="activity label" id="module-16313"><div class="cssbox">
  <div class="cssbox_head">

Source code 1.9.5:

<li class="activity label" id="module-16313"><span class="label"><div class="cssbox">

and I want shot of my frontpage validation error caused by <span class="label"> so that I can display my W3C validated button.