Commit 5dcdc4d6 authored by saurabhbatra's avatar saurabhbatra Committed by eileen

CRM-17859 - import contacts from CSV: sanitise / cleanup non-breaking… (#7813)

* CRM-17859 - import contacts from CSV: sanitise / cleanup non-breaking spaces from records

https://issues.civicrm.org/jira/browse/CRM-17859

* Update String.php
parent 8eb5b6c2
......@@ -229,6 +229,12 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
}
$first = FALSE;
// CRM-17859 Trim non-breaking spaces from columns.
$row = array_map(
function($string) {
return trim($string, chr(0xC2) . chr(0xA0));
}, $row);
$row = array_map('civicrm_mysql_real_escape_string', $row);
$sql .= "('" . implode("', '", $row) . "')";
$count++;
......
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