From: skodak Date: Sat, 6 Jan 2007 20:45:17 +0000 (+0000) Subject: MDL-7861 xhtml strict fixes - do not add label for static element in formslib X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=217d03a14c746ecf32a355166cb6d76823be603d;p=moodle.git MDL-7861 xhtml strict fixes - do not add label for static element in formslib --- diff --git a/lib/formslib.php b/lib/formslib.php index 46a7b2e052..f2a7cfd40f 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1359,6 +1359,9 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{ $html = str_replace('{help}', '', $html); } + if ($element->getType() == 'static') { + $html = preg_replace('||i', '', $html); //xhtml compliance - no label for static content + } $this->_templates[$element->getName()] = $html; if (!is_null($element->getAttribute('id'))) { $id = $element->getAttribute('id');