This issue is for Webflow @Brando and perhaps anyone else who has come across this issue and found a solution! Possibly @vincent@samliew@sabanna
I am using schema.org for a recipe site that I’m building. I am using JSON-LD to write the markup which is within <script> tags. I want to list the ingredient like this
"3 or 4 ripe bananas, smashed", "1 egg", "3/4 cup of sugar"
and I have created a text field in the CMS to allow me to do this. However, Webflow outputs this as
"3 or 4 ripe bananas, smashed", "1 egg", "3/4 cup of sugar"
when inside <script> tags. This creates an error and is not recognised as structured data.
Is there a workaround for this? Or can this be fixed on Webflow’s side so that the quotes work in HTML fields when inside script tags?
No need to escape quotes . Outside use double quotes - and inside use single quote.
"name": "Mom's World Famous Banana Bread",
"recipeIngredient": [
"3 or 4 ripe bananas, smashed",
"1 egg",
"3/4 cup of sugar"
],
This is not webflow issue. The “replacement” happens when you write " as HTML entity (Inside body as plain HTML). Not inside script tag, CSS inline style, data-attribute, meta-tags (title, description) and so on.