Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.
This repository was archived by the owner on May 8, 2024. It is now read-only.

Data strings that contain both : (colons) and ' (apostrophe) cause issues with data import #80

@iamalfonse

Description

@iamalfonse

Problem: When importing data, any text data that contains both a colon and an apostrophe in the same text data, it causes an error when importing due to the way yaml files are created.

To Produce:

  • In Contentful, create a Content Model with a Short text field. Save it.
  • Then create a new Content using that Content Model.
  • In the Short text field, type any string that contains both a colon (:) and and apostrophe (') in the text field. Example: "Awesome: This isn't going to work because it has a colon and an apostrophe". Save it.
  • In Jekyll, do a data import in terminal using jekyll contentful or bundle exec jekyll contentful if using bundler.
  • The data will get imported, but the colons and/or apostrophe is not escaped, so any text after will not display correctly when adding it to a page.
  • Note: if text input ONLY has a colon or ONLY has an apostrophe, it get's escaped correctly. It only errors out when both are added to the text input string.

Possible fix:

  • Escape all colons and apostrophes during data import

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions