Skip to content
Snippets Groups Projects
Commit 804f8b8e authored by Jamie McClelland's avatar Jamie McClelland Committed by Seamus Lee
Browse files

escape alphanumeric/checkbox custom data

parent a612c2a8
Branches
Tags
No related merge requests found
......@@ -351,6 +351,12 @@ SELECT f.id, f.label, f.data_type,
foreach ($value as $key => $val) {
$value[$key] = str_replace(['[', ']', ','], ['\[', '\]', '[:comma:]'], $val);
$value[$key] = str_replace('|', '[:separator:]', $value[$key]);
if ($field['data_type'] == 'String') {
$value[$key] = CRM_Utils_Type::escape($value[$key], 'String');
}
elseif ($value) {
$value[$key] = CRM_Utils_Type::escape($value[$key], 'Integer');
}
}
$value = implode(',', $value);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment