Skip to content

Commit

Permalink
Combine the noscript/mglyph prevention blocks
Browse files Browse the repository at this point in the history
These were on two separate branches, so let's be smart.
  • Loading branch information
flavorjones committed Dec 1, 2024
1 parent 5658335 commit a7b0cfe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rails/html/scrubbers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def validate!(var, name)
warn("WARNING: 'malignmark' tags cannot be allowed by the PermitScrubber and will be scrubbed")
var.delete("malignmark")
end
end

if var && name == :tags && var.include?("noscript")
warn("WARNING: 'noscript' tags cannot be allowed by the PermitScrubber and will be scrubbed")
var.delete("noscript")
if var.include?("noscript")
warn("WARNING: 'noscript' tags cannot be allowed by the PermitScrubber and will be scrubbed")
var.delete("noscript")
end
end

var
Expand Down

0 comments on commit a7b0cfe

Please sign in to comment.