MDL-44657 forms: Form identifiers should only contain basic characters

This commit is contained in:
Paul Holden
2014-11-13 16:25:12 +08:00
committed by Frederic Massart
parent 21db825b19
commit 309a919074
+3 -1
View File
@@ -211,7 +211,9 @@ abstract class moodleform {
* @return string form identifier.
*/
protected function get_form_identifier() {
return get_class($this);
$class = get_class($this);
return preg_replace('/[^a-z0-9_]/i', '_', $class);
}
/**