MDL-7861 xhtml strict fixes - do not add label for static element in formslib, fixed wrong regex in previous commit
This commit is contained in:
+1
-1
@@ -1360,7 +1360,7 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{
|
||||
|
||||
}
|
||||
if ($element->getType() == 'static') {
|
||||
$html = preg_replace('|<label.*?</label>|i', '', $html); //xhtml compliance - no label for static content
|
||||
$html = preg_replace('/(<label.*?>)|(<\/label>)/i', '', $html); //xhtml compliance - no label for static content
|
||||
}
|
||||
$this->_templates[$element->getName()] = $html;
|
||||
if (!is_null($element->getAttribute('id'))) {
|
||||
|
||||
Reference in New Issue
Block a user