lib/processors/haml_template_processor.rb in brakeman-0.0.3 vs lib/processors/haml_template_processor.rb in brakeman-0.1.0

- old
+ new

@@ -1,9 +1,25 @@ require 'processors/template_processor' #Processes HAML templates. class HamlTemplateProcessor < TemplateProcessor HAML_FORMAT_METHOD = /format_script_(true|false)_(true|false)_(true|false)_(true|false)_(true|false)_(true|false)_(true|false)/ + + def initialize *args + super + + @tracker.libs.each do |name, lib| + if name.to_s =~ /^Haml::Filters/ + begin + require lib[:file] + rescue Exception => e + if OPTIONS[:debug] + raise e + end + end + end + end + end #Processes call, looking for template output def process_call exp target = exp[1] if sexp? target