diff --git a/lib/brakeman/processors/haml_template_processor.rb b/lib/brakeman/processors/haml_template_processor.rb index 375ff17d26..64d142df1b 100644 --- a/lib/brakeman/processors/haml_template_processor.rb +++ b/lib/brakeman/processors/haml_template_processor.rb @@ -29,16 +29,15 @@ def process_call exp method = exp.method - if (call? target and target.method == :_hamlout) or target == :_hamlout + if (call? target and target.method == :_hamlout) res = case method when :adjust_tabs, :rstrip!, :attributes #Check attributes, maybe? ignore - when :options - Sexp.new :call, :_hamlout, :options, exp.arglist - when :buffer - Sexp.new :call, :_hamlout, :buffer, exp.arglist + when :options, :buffer + exp when :open_tag - Sexp.new(:tag, process(exp.arglist)) + process(exp.arglist) + exp else arg = exp.first_arg diff --git a/lib/brakeman/processors/output_processor.rb b/lib/brakeman/processors/output_processor.rb index ab9b74a8a5..708f8b50f2 100644 --- a/lib/brakeman/processors/output_processor.rb +++ b/lib/brakeman/processors/output_processor.rb @@ -23,36 +23,6 @@ def process exp end end - def process_call exp - if exp[0].is_a? Symbol - target = exp[0] - - method = exp[1] - - args = process exp[2] - - out = nil - - if method == :[] - if target - out = "#{target}[#{args}]" - else - raise Exception.new("Not sure what to do with access and no target: #{exp}") - end - else - if target - out = "#{target}.#{method}(#{args})" - else - out = "#{method}(#{args})" - end - end - exp.clear - out - else - super exp - end - end - def process_lvar exp out = "(local #{exp[0]})" exp.clear