Nokogiri::XML hack to set the default option to NOBLANKS

This commit is contained in:
erwanlr
2013-03-11 17:18:05 +01:00
parent eaffb139ef
commit 2043adb76e
5 changed files with 13 additions and 33 deletions

View File

@@ -23,12 +23,9 @@ class Vulnerable
# @return an array of WpVulnerability (can be empty)
def vulnerabilities
xml = Nokogiri::XML(File.open(@vulns_file))
vulnerabilities = []
xml = Nokogiri::XML(File.open(@vulns_file)) do |config|
config.noblanks
end
xml.xpath(@vulns_xpath).each do |node|
vulnerabilities << WpVulnerability.new(
node.search('title').text,