MDL-49284 formslib: fix strict validation of HTML.
This commit is contained in:
+1
-1
@@ -2905,7 +2905,7 @@ class MoodleQuickForm_Rule_Required extends HTML_QuickForm_Rule {
|
||||
global $CFG;
|
||||
if (!empty($CFG->strictformsrequired)) {
|
||||
if (!empty($format) && $format == FORMAT_HTML) {
|
||||
return array('', "{jsVar}.replace(/(<[^img|hr|canvas]+>)| |\s+/ig, '') == ''");
|
||||
return array('', "{jsVar}.replace(/(<(?!img|hr|canvas)[^>]*>)| |\s+/ig, '') == ''");
|
||||
} else {
|
||||
return array('', "{jsVar}.replace(/^\s+$/g, '') == ''");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user