Obsidian JSON/CSV Plugin Corrupts YAML Front Matter If a Colon Is In Input Data

What I’m trying to do

I am trying to inport a CSV file using the JSON/CSV Importer Plugin.

The data includes 7 fields: Card-List,Card,Description,Due-Date,Labels,Subtasks,Comments.

I have laid out the YAML front matter and formatting in the template. The data imports into the fields correctly.

However, when data in the Card field - which is used as the note Title - contains a “:”, the YAML reports a malformed YAML.

Things I have tried

I didn’t search the help docs per se. The issue isn’t there. The JSON/CSV Importer plugin has nothing on this issue. Searching Google turned up people with problems using colons in the YAML front matter, but that was because it was inserted by an external editor and not the Properties Editor in Obsidian. That is unrelated to this problem because this problem involves imported data into the front matter.

To be more precise, of course I can do a search and replace of all colons in the data. This, however, is a shotgun approach and may affect the readability of the imported data. The data imports into the fields fine, and reads fine in the displayed note. It’s just that the data breaks the YAML.

It would appear that the JSON/CSV Importer plugin is not programmed to recognize a colon in input data.

What I am wondering is if there is a way that I can somehow “clean” the input data of colons - and potentially other YAML breaking characters - inside the YAML front matter.

I can’t do this with an external editor cleaning the CSV file because I use the colon all over the place in the Card field, the Subtasks field and the Comments field. I don’t know any way to tell the editor how to find and replace colons that may be anywhere in the data.

If I could, however, in each of those fields, tell the Importer to substitute a space for the colon, that would hopefully solve the problem.

Appreciate any assistance or suggestions. Thanks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.