openstreetmap-website/config/initializers/sanitize.rb
Andreas Geyer-Schulz f6f23ed0ee
Fix typo: change 'noreferer' to 'noreferrer'
as the correct rel attribute in external links.
2020-01-25 20:10:23 +01:00

5 lines
260 B
Ruby

Sanitize::Config::OSM = Sanitize::Config::RELAXED.dup
Sanitize::Config::OSM[:elements] -= %w[div style]
Sanitize::Config::OSM[:add_attributes] = { "a" => { "rel" => "nofollow noopener noreferrer" } }
Sanitize::Config::OSM[:remove_contents] = %w[script style]