Reason for escaping forward slashes in settings_data.json?

Highlighted
Shopify Partner
5 0 9

Hi there, 

 

I am wondering if anyone knows why the default theme (Debut) settings_data.json file is escaping forward slashes? For example: "social_facebook_link": "https:\/\/www.facebook.com\/placeholder" ? Are the escapes necessary? My theme is running fine without those in the settings_data.json file, however I would like to confirm that all is well without the escapes.

 

Thank you

Danny

Highlighted
New Member
1 0 0

The JSON implementation used by Shopify escapes all "/" characters in JSON, so that an unescaped "</script>" tag doesn't throw the whole thing.

It's discussed in this pull request: https://github.com/flori/json/pull/405

0 Likes