diff --git a/src/Controller/UwDownloadCsvController.php b/src/Controller/UwDownloadCsvController.php index 4d4ee16414ba6cb49f254235cb05fe00316d5441..58412d2c3362ec194059d65b08b0c971c1e0aec7 100644 --- a/src/Controller/UwDownloadCsvController.php +++ b/src/Controller/UwDownloadCsvController.php @@ -90,10 +90,10 @@ class UwDownloadCsvController extends ControllerBase { // Step through each of the nodes and get the info. foreach ($nodes as $node) { - // Pull out the info about the node. + // Pull out the info about the node, making sure the title is CSV-safe. $data = [ 'nid' => $node->id(), - 'title' => '"' . $node->getTitle() . '"', + 'title' => '"' . str_replace('"', '""', $node->getTitle()) . '"', 'type' => $node->type->entity->label(), 'path' => $this->pathAlias->getAliasByPath('/node/' . $node->id()), 'published' => $node->status->value == 1 ? 'yes' : 'no',