]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7861 xhtml strict fixes - do not add label for static element in formslib, fixed...
authorskodak <skodak>
Sat, 6 Jan 2007 21:22:02 +0000 (21:22 +0000)
committerskodak <skodak>
Sat, 6 Jan 2007 21:22:02 +0000 (21:22 +0000)
lib/formslib.php

index f2a7cfd40fd74b9ab4ddd04b543f4050065f67f6..09962abd54b1b1ce964e4988f7380ad2d1e64fab 100644 (file)
@@ -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'))) {