asafdav / ng-csv

Simple directive that turns arrays and objects into downloadable CSV files
MIT License
573 stars 215 forks source link

fix escaping fields #152

Open ycintre opened 8 years ago

ycintre commented 8 years ago

Escape the field with double quotes if it contains a double quote in the value.

This is specified in the RFC as follows:

6 . Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes.

ycintre commented 8 years ago

I also added a fix to the escape mechanism to use the user-specified field delimiter instead of hard-coded comma