Skip to content

Commit a7b0cfe

Browse files
committed
Combine the noscript/mglyph prevention blocks
These were on two separate branches, so let's be smart.
1 parent 5658335 commit a7b0cfe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rails/html/scrubbers.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ def validate!(var, name)
149149
warn("WARNING: 'malignmark' tags cannot be allowed by the PermitScrubber and will be scrubbed")
150150
var.delete("malignmark")
151151
end
152-
end
153152

154-
if var && name == :tags && var.include?("noscript")
155-
warn("WARNING: 'noscript' tags cannot be allowed by the PermitScrubber and will be scrubbed")
156-
var.delete("noscript")
153+
if var.include?("noscript")
154+
warn("WARNING: 'noscript' tags cannot be allowed by the PermitScrubber and will be scrubbed")
155+
var.delete("noscript")
156+
end
157157
end
158158

159159
var

0 commit comments

Comments
 (0)