mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-04 01:25:14 -07:00
Use early returns rather than large if in Variable#taint_check
This commit is contained in:
@@ -107,7 +107,9 @@ module Liquid
|
||||
end
|
||||
|
||||
def taint_check(context, obj)
|
||||
if obj.tainted? && Template.taint_mode != :lax
|
||||
return unless obj.tainted?
|
||||
return if Template.taint_mode == :lax
|
||||
|
||||
@markup =~ QuotedFragment
|
||||
name = Regexp.last_match(0)
|
||||
|
||||
@@ -123,5 +125,4 @@ module Liquid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user