Don't try to play with the comments in passive detection, just ignore them
This commit is contained in:
@@ -83,7 +83,7 @@ class WpItems < Array
|
||||
results = new(wp_target)
|
||||
# improves speed
|
||||
body = remove_base64_images_from_html(Browser.get(wp_target.url).body)
|
||||
page = Nokogiri::HTML(remove_conditional_comments(body))
|
||||
page = Nokogiri::HTML(body)
|
||||
names = []
|
||||
|
||||
page.css('link,script,style').each do |tag|
|
||||
|
||||
@@ -73,10 +73,6 @@ def add_trailing_slash(url)
|
||||
url =~ /\/$/ ? url : "#{url}/"
|
||||
end
|
||||
|
||||
def remove_conditional_comments(text)
|
||||
text.gsub(/\<\!--\[if[^>]+>(.*?)\<\!\[end[^>]+>/im, '\1')
|
||||
end
|
||||
|
||||
# loading the updater
|
||||
require_files_from_directory(UPDATER_LIB_DIR)
|
||||
@updater = UpdaterFactory.get_updater(ROOT_DIR)
|
||||
|
||||
Reference in New Issue
Block a user