Skip to content

Quoting issues when using inline variable with filter #169

@Kangaroux

Description

@Kangaroux

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions