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

This commit is contained in:
Paul Holden 2014-11-13 16:20:16 +08:00 committed by Frederic Massart
parent 683d7de4d1
commit 68ef378b1b

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);
}
/**