Commit 7175292e authored by Jamie McClelland's avatar Jamie McClelland Committed by Seamus Lee

escape alphanumeric/checkbox custom data

parent 87efe483
...@@ -351,6 +351,12 @@ SELECT f.id, f.label, f.data_type, ...@@ -351,6 +351,12 @@ SELECT f.id, f.label, f.data_type,
foreach ($value as $key => $val) { foreach ($value as $key => $val) {
$value[$key] = str_replace(['[', ']', ','], ['\[', '\]', '[:comma:]'], $val); $value[$key] = str_replace(['[', ']', ','], ['\[', '\]', '[:comma:]'], $val);
$value[$key] = str_replace('|', '[:separator:]', $value[$key]); $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); $value = implode(',', $value);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment