Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'jsonify' instead of 'url_encode' for JavaScript data export #160

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Mar 1, 2019

The JSON data format is natively compatible with the parsing of
JavaScript code. It can be used as the literal value of any
JavaScript variable or JavaScript object property value.

Previously:

window.DATA = {'title':'Foo%20%22Bar%22'};
title = decodeUrl(DATE.title);

Now:

window.DATA = {'title':"Foo \"Bar\""};
title = DATE.title;

The JSON data format is natively compatible with the parsing of
JavaScript code. It can be used as the literal value of any
JavaScript variable or JavaScript object property value.

Previously:

> window.DATA = {'title':'Foo%20%22Bar%22'};
> title = decodeUrl(DATE.title)

Now:

> window.DATA = {'title':"Foo \"Bar\""};
> title = DATE.title
@kitian616
Copy link
Owner

Cool, I didn't know Liquid a jsonify tag, thanks!

@kitian616 kitian616 added the Type: Enhancement Type: New feature requests label Mar 23, 2019
@kitian616 kitian616 merged commit 7530913 into kitian616:master Jun 11, 2019
@Krinkle Krinkle deleted the json-search branch June 11, 2019 18:05
monical1 pushed a commit to monical1/monical2 that referenced this pull request Sep 12, 2019
Use 'jsonify' instead of 'url_encode' for JavaScript data export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Type: New feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants