trailblazer / formular

Form builder for Ruby. Fast, Furious, and Framework-Agnostic.
MIT License
81 stars 17 forks source link

Breaking Change - whitelist html attributes rather than blacklist #54

Closed fran-worley closed 6 years ago

fran-worley commented 6 years ago

Currently all option values are set as html attributes unless they are explicitly declared as options.

The downside to the approach is that you run the risk of inadvertently creating invalid html, or other unexpected results if you fail to whitelist all your non attribute properties.

I quite like the ember approach here of having an explicit whitelist of keys to render as html attributes. So we'd essentially be doing the opposite of what we do now.

fran-worley commented 6 years ago

Fixed via https://github.com/trailblazer/formular/commit/47b796372a0d6ac9f705925093f344fad9e35739