diff --git a/lib/formslib.php b/lib/formslib.php index f2a7cfd40fd..09962abd54b 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1360,7 +1360,7 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{ } if ($element->getType() == 'static') { - $html = preg_replace('||i', '', $html); //xhtml compliance - no label for static content + $html = preg_replace('/()|(<\/label>)/i', '', $html); //xhtml compliance - no label for static content } $this->_templates[$element->getName()] = $html; if (!is_null($element->getAttribute('id'))) {