X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f442bb9e80c07fa452d56ed6a692e0b2eeb829d3..6e7fbc9a870a933afcdf18fca16d6283f994b1ca:/config/initializers/sanitize.rb diff --git a/config/initializers/sanitize.rb b/config/initializers/sanitize.rb index 609bb8734..d6bd6c3ee 100644 --- a/config/initializers/sanitize.rb +++ b/config/initializers/sanitize.rb @@ -4,6 +4,8 @@ Sanitize::Config::OSM = Sanitize::Config.merge( :add_attributes => { "a" => { "rel" => "nofollow noopener noreferrer" } }, :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 )