rails / rails-html-sanitizer

MIT License
302 stars 80 forks source link

use railtie to set default sanitizer #170

Closed tongueroo closed 11 months ago

tongueroo commented 11 months ago

What

This PR sets the default sanitizer in a railtie.

Why

This requires a bit of explanation. Setting the default sanitizer in a railtie allows actionview to be used with frameworks other than Rails. In this case, I'm using actionview with Jets.

UPDATE: This PR is no longer relevant. Instead, this PR sets the default config.action_view.sanitizer_vendor is set in the actionview railtie.

Related PR on the actionview side https://github.com/rails/rails/pull/49643 Thanks for considering the PR.

tongueroo commented 11 months ago

No longer relevant. Setting config.action_view.sanitizer_vendor is set in the actionview railtie instead.