From 3df06e6b332450b7e0c51982b2bc55691549ce62 Mon Sep 17 00:00:00 2001 From: robertall Date: Wed, 14 May 2008 18:11:22 +0000 Subject: [PATCH] MDL-14442: apply addslashes() before importing values, to allow quotes in field's values. Merged from MOODLE_19_STABLE --- mod/data/import.php | 1 + 1 file changed, 1 insertion(+) diff --git a/mod/data/import.php b/mod/data/import.php index c073a5cdc3..21cf5c4a66 100755 --- a/mod/data/import.php +++ b/mod/data/import.php @@ -130,6 +130,7 @@ // 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]; -- 2.39.5