Merge branch 'MDL-36433-master' of git://github.com/itamart/moodle
[moodle.git] / lib / formslib.php
index d64b619..03c8c33 100644 (file)
@@ -1893,7 +1893,7 @@ function qf_errorHandler(element, _qfMsg) {
             list($jsArr,$element)=$jsandelement;
             //end of fix
             $escapedElementName = preg_replace_callback(
-                '/[_\[\]]/',
+                '/[_\[\]-]/',
                 create_function('$matches', 'return sprintf("_%2x",ord($matches[0]));'),
                 $elementName);
             $js .= '