You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #202 Fix double escaping in stimulus DTOs when using toArray() in combination with form methods (jeroennoten)
This PR was merged into the main branch.
Discussion
----------
Fix double escaping in stimulus DTOs when using toArray() in combination with form methods
This fixes a double-escaping bug when the `toArray()` methods are used in combination with the `form_` functions, as described in the README.
`toArray()` should return an array with non-escaped attribute key-value pairs, because they will be escaped when printed.
Therefore, I moved the escaping of the values to the `toString()` methods and I added some additional tests for the DTO classes to verify the change.
This additionally fixes a missed escape for the `data-[controller]-[key]-class` attribute values.
Commits
-------
0d40126 Fix double escaping in stimulus DTOs when using toArray() in combination with form methods
0 commit comments