juliocamarero/liferay-plugins — pull request #122 by peterborkuti (2014-10-03 09:22:51+00:00)
Title: [TECHNICAL REQUEST] LPS-50405 + LPS-50480

Hi Julio,

**LPS-50405 Web form portlet has hard-coded separator for csv export**
https://issues.liferay.com/browse/LPS-50405

It is a customer issue. The customer complained about the hard-coded ";". First we did not think, that it is an issue, but we uses "," in other places in the portal, see ExportUserAction, DDLCSVExporter.
Moreover, there is an RFC (http://tools.ietf.org/html/rfc4180), which claims:
```
4. Within the header and each record, there may be one or more
fields, separated by commas.
```

First it seemed to me that changing the hard-coded ";" to "," is enough, but than I thought, that it would lead incompatibility (What if a user uses scripts to process the output and it is prepared to ";"), so I choose a property for storing the field separator.

**LPS-50480 Web form portlet does not escape double-quotes in fields at csv export**
https://issues.liferay.com/browse/LPS-50480

I found this bug (and some others, namely https://issues.liferay.com/browse/LPS-50509 , https://issues.liferay.com/browse/LPS-50510) and I fixed this.
It is not a customer issue, but I would like you to review it, also. I made some other changes also (changing hard-coded string literals to CharPool characters and I changed the logic of dealing with field separators at the end of the lines)

I hope, you will find it useful.

Thank you in advance
Péter