Permalink
Browse files

MDL-14442: apply addslashes() before importing values, to allow quote…

…s in field's values
  • Loading branch information...
robertall
robertall committed May 14, 2008
1 parent 1eae641 commit d80e3a0b10fd55d00e3aedf7d1e6ce36a7887432
Showing with 1 addition and 0 deletions.
  1. +1 −0 mod/data/import.php
View
@@ -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];

0 comments on commit d80e3a0

Please sign in to comment.