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

Quoting issues when using inline variable with filter #169

Open
Kangaroux opened this issue Nov 10, 2016 · 0 comments
Open

Quoting issues when using inline variable with filter #169

Kangaroux opened this issue Nov 10, 2016 · 0 comments

Comments

@Kangaroux
Copy link

Example: %input{type: "text", value: "={f.value|default:""}"}

The double quotes for default are removed, which renders to value='{{ f.value|default: }}' and raises an exception because it's missing a parameter.

Using single quotes causes them to be escaped, so you get: value='{{ f.value|default:\'\'}}', also raising an exception.

For this to work you need to wrap the attribute in single quotes and use double quotes inside, like: %input{type: "text", value: '={f.value|default:""}'}

If single and double quotes are both supported for attributes then the same should apply for inside the attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant