]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14442: apply addslashes() before importing values, to allow quotes in field's...
authorrobertall <robertall>
Wed, 14 May 2008 18:11:22 +0000 (18:11 +0000)
committerrobertall <robertall>
Wed, 14 May 2008 18:11:22 +0000 (18:11 +0000)
mod/data/import.php

index c073a5cdc3a3cda42151e61efc38f0b9639c5492..21cf5c4a66c3a264473e798757f8aca62f81274e 100755 (executable)
                         // for now, only for "latlong" and "url" fields, but that should better be looked up from
                         // $CFG->dirroot . '/mod/data/field/' . $field->type . '/field.class.php'
                         // once there is stored how many contents the field can have. 
+                        $value = addslashes($value);
                         if (preg_match("/^(latlong|url)$/", $field->type)) {
                             $values = explode(" ", clean_param($value, PARAM_NOTAGS), 2);
                             $content->content  = $values[0];