the crash issue between the inch symbol(") and JSON for variant on the Product Page.

Topic summary

Problem: Size option values containing the inch symbol (") were breaking the product page because the quote caused invalid JSON, which in turn stopped custom JavaScript from working.

Cause: The double quote in variant data wasn’t escaped when rendering to JSON, creating a formatting error (JSON = JavaScript Object Notation).

Suggested fix: Apply Shopify Liquid’s escape filter to the variant object at the point where it’s rendered, so special characters (like ") are safely encoded and the JSON remains valid.

Outcome: After adding the escape filter, the issue was resolved and the custom JS worked correctly.

Status: Resolved; no further action indicated.

Summarized with AI on January 14. AI used: gpt-5.

Hey guys,

I hope you are doing well :slightly_smiling_face:

I’m facing the crash issue between inch symbol of the Size option value and json format in the Product Page.

https://prnt.sc/kAcA9qlnAs2a

What is the solution to avoid this issue?

Thank you!

Hi Ecomdevstar,

Is this causing the variant to not appear/ work correctly due to the " character causing a JSON formatting error?

Thank you for your reply Liam!

Yeah, the my custom JS code is not working due to this.

https://prnt.sc/-zw8Ui_lb3Xe

What could help is to ensure that where the variant is being rendered, that the Liquid object has the escape filter applied to it. Can you try this to see if it fixes the issue?

Great thank you Liam!

I’ve solved that issue!

Good luck with you!