Skip to content
Snippets Groups Projects
Commit 4fb9d3b4 authored by Pravin Ajaaz's avatar Pravin Ajaaz Committed by Chris Leppanen
Browse files

Issue #2397151 by Pravin Ajaaz: importer UI for CSVs should quote column names that contain commas

parent 335d1759
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,12 @@ class FeedsCSVParser extends FeedsParser {
$mappings = feeds_importer($this->id)->processor->config['mappings'];
$sources = $uniques = array();
foreach ($mappings as $mapping) {
$sources[] = check_plain($mapping['source']);
if (strpos($mapping['source'], ',') !== FALSE) {
$sources[] = '"' . check_plain($mapping['source']) . '"';
}
else {
$sources[] = check_plain($mapping['source']);
}
if (!empty($mapping['unique'])) {
$uniques[] = check_plain($mapping['source']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment