diff --git a/lib/formslib.php b/lib/formslib.php
index <HASH>..<HASH> 100644
--- a/lib/formslib.php
+++ b/lib/formslib.php
@@ -80,7 +80,7 @@ class moodleform {
 
         if ($validated === null) {
             $internal_val = $this->_form->validate();
-            $moodle_val = $this->validation($this->_form->exportValues(null, false));
+            $moodle_val = $this->validation($this->_form->exportValues(null, true));
             if ($moodle_val !== true) {
                 if (!empty($moodle_val)) {
                     foreach ($moodle_val as $element=>$msg) {
moodleform->validation() receives slashed $data now to make it similar to data_submitted() and prevent potential SQL injections