<p>Importing into Redactor from a CSV file and we have no control over the formatting.
There is a column containing text that is in quote marks but on importing into a Redactor field, any string that contains a comma is treated as a JSON object, so eg:</p>
<pre><code>&quot;Our used vans also come with free MobiloVan roadside assistance, meaning you will not need to pay any additional costs for breakdown cover. As the UK’s largest Mercedes-Benz commercial vehicle franchise Dealer in the UK, Rygor is well positioned to offer extensive expertise and support.&quot;
</code></pre>
<p>Is being saved as:</p>
<p><a href="https://i.sstatic.net/5qk8G.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5qk8G.png" alt="screenshot from CMS" /></a></p>
<p>How best to save this as a paragraph within Redactor without FeedMe thinking it is a JSON object or interpreting the commas within the string as delimiters?</p>
<p>Craft v 3.6.16
FeedMe v 4.3.6</p>
<p>Cole</p>

CC BY-SA 4.0
2021-06-13T14:32:21.757Z
What’s the entire row of the CSV file you’re having issues with? How is the original CSV being output? My guess is it’s not being escaped properly.
RitterKnight
CC BY-SA 4.0
2021-06-14T08:34:23.667Z
Thanks @RitterKnight - sample row posted at https://gist.github.com/cole007/86214342b1e3f0a853afb84c04dd26b3

Sample output (in Redactor) come out as:

```
["Our used vans also come with free MobiloVan roadside assistance","meaning you will not need to pay any additional costs for breakdown cover. As the UK\u2019s largest Mercedes-Benz commercial vehicle franchise Dealer in the UK","Rygor is well positioned to offer extensive expertise and support."]
```
Cole Henley
CC BY-SA 4.0
2021-06-15T03:31:46.180Z
Very odd. I grabbed your CSV and popped it into my test Craft install and it worked fine. Are you changing any settings in the [``feedme config``](https://docs.craftcms.com/feed-me/v4/get-started/configuration.html#control-panel)? I had no problems importing. I ran you CSV sample through an [online linter](https://csvlint.io) and it mentioned "Your CSV appears to be encoded in ASCII-8BIT. We recommend you use UTF-8"  but that didn't affect my import. some servers might have issues with that though, which could also explain the ``\u2019`` in place of the apostrophe...
RitterKnight
CC BY-SA 4.0
2021-06-17T10:38:30.490Z
Some progress on this (at least in looking at the source of the issue).
It seems to be only affecting Redactor fields within a Matrix Block.

Imagine changing the datadelimiter setting would resolve but we are tied to the formatting of the file supplied (and its formatting) in this instance.
Cole Henley
CC BY-SA 4.0
2021-06-18T17:08:09.057Z
Your original question didn't mention Matrix blocks at all but I wasn't able to reproduce your problem. Importing into a matrix text block worked just fine on a stock install for me. Must be something with your config?
RitterKnight
<redactor><plugin-feedme><csv>
Feedme CSV into Redactor encoded as JSON
# Feedme CSV into Redactor encoded as JSON

(Asked by: username_0 on 2021-06-11)

Importing into Redactor from a CSV file and we have no control over the formatting.
There is a column containing text that is in quote marks but on importing into a Redactor field, any string that contains a comma is treated as a JSON object, so eg:
"Our used vans also come with free MobiloVan roadside assistance, meaning you will not need to pay any additional costs for breakdown cover. As the UK’s largest Mercedes-Benz commercial vehicle franchise Dealer in the UK, Rygor is well positioned to offer extensive expertise and support."

Is being saved as:

How best to save this as a paragraph within Redactor without FeedMe thinking it is a JSON object or interpreting the commas within the string as delimiters?
Craft v 3.6.16
FeedMe v 4.3.6
Cole

**Tags:** redactor, plugin-feedme, csv

> **Comments:**
> **username_1**: What’s the entire row of the CSV file you’re having issues with? How is the original CSV being output? My guess is it’s not being escaped properly.  
> **username_0**: Thanks @username_1 - sample row posted at https://gist.github.com/cole007/86214342b1e3f0a853afb84c04dd26b3  Sample output (in Redactor) come out as:  ``` ["Our used vans also come with free MobiloVan roadside assistance","meaning you will not need to pay any additional costs for breakdown cover. As the UK\u2019s largest Mercedes-Benz commercial vehicle franchise Dealer in the UK","Rygor is well positioned to offer extensive expertise and support."] ```  
> **username_1**: Very odd. I grabbed your CSV and popped it into my test Craft install and it worked fine. Are you changing any settings in the [``feedme config``](https://docs.craftcms.com/feed-me/v4/get-started/configuration.html#control-panel)? I had no problems importing. I ran you CSV sample through an [online linter](https://csvlint.io) and it mentioned "Your CSV appears to be encoded in ASCII-8BIT. We recommend you use UTF-8"  but that didn't affect my import. some servers might have issues with that though, which could also explain the ``\u2019`` in place of the apostrophe...  
> **username_0**: Some progress on this (at least in looking at the source of the issue). It seems to be only affecting Redactor fields within a Matrix Block.  Imagine changing the datadelimiter setting would resolve but we are tied to the formatting of the file supplied (and its formatting) in this instance.  
> **username_1**: Your original question didn't mention Matrix blocks at all but I wasn't able to reproduce your problem. Importing into a matrix text block worked just fine on a stock install for me. Must be something with your config?  

---

## 0 answers

