Prevent addition of style attributes to all elements

This commit is contained in:
Andy Allan 2021-03-24 20:55:30 +00:00
parent 580b7bfc0c
commit bb2afc3e8b
2 changed files with 13 additions and 1 deletions

View file

@ -5,6 +5,7 @@ Sanitize::Config::OSM = Sanitize::Config.merge(
:remove_contents => %w[script style],
:transformers => lambda do |env|
env[:node].remove_class
env[:node].kwattr_remove("style", nil)
env[:node].add_class("table table-sm w-auto") if env[:node_name] == "table"
end
)