Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MDL-44657 forms: Form identifiers should only contain basic characters
[moodle.git]
/
lib
/
formslib.php
diff --git
a/lib/formslib.php
b/lib/formslib.php
index
acb5db3
..
1291d31
100644
(file)
--- a/
lib/formslib.php
+++ b/
lib/formslib.php
@@
-211,7
+211,9
@@
abstract class moodleform {
* @return string form identifier.
*/
protected function get_form_identifier() {
* @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);
}
/**
}
/**