MDL-30308 outputrequirementslib.php breaks xhtml validation
authorPetr Skoda <commits@skodak.org>
Sat, 19 Nov 2011 17:43:55 +0000 (18:43 +0100)
committerPetr Skoda <commits@skodak.org>
Sat, 19 Nov 2011 17:43:55 +0000 (18:43 +0100)
Credit goes to Matthew Davidson.

lib/outputrequirementslib.php

index 5d90384..93c5cbe 100644 (file)
@@ -973,9 +973,9 @@ class page_requirements_manager {
         }
 
         if (debugging('', DEBUG_DEVELOPER)) {
-            $code .= '<script src="'.$this->yui3loader->base.'yui/yui-debug.js"></script>';
+            $code .= '<script type="text/javascript" src="'.$this->yui3loader->base.'yui/yui-debug.js"></script>';
         } else {
-            $code .= '<script src="'.$this->yui3loader->base.'yui/yui-min.js"></script>';
+            $code .= '<script type="text/javascript" src="'.$this->yui3loader->base.'yui/yui-min.js"></script>';
         }
 
         return $code;