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

Attributes added by stimulus_controller should be escaped #968

Closed
1ed opened this issue Jun 25, 2023 · 0 comments · Fixed by #969
Closed

Attributes added by stimulus_controller should be escaped #968

1ed opened this issue Jun 25, 2023 · 0 comments · Fixed by #969

Comments

@1ed
Copy link
Contributor

1ed commented Jun 25, 2023

When I write

<div {{ attributes.defaults(stimulus_controller('my-controller', { params: ['a', 'b'] })) }}>

then params' value should be escaped as html attributes.

Now it renders

data-controller="my-controller live" data-my-controller-params-value="["a","b"]" ...

instead of

data-controller="my-controller live" data-my-controller-params-value="&#x5B;&quot;a&quot;,&quot;b&quot;&#x5D;" ...
@1ed 1ed changed the title Live attributes should be escaped Attributes added by stimulus_controller should be escaped Jun 25, 2023
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

Successfully merging a pull request may close this issue.

1 participant