From f46df7791fee51ac82c4305bfb686f30d121be65 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Mon, 8 Nov 2010 10:09:46 +0000 Subject: [PATCH] Fix case where save_and_open_page was mangling URLs in self-closing elements. See https://github.com/jnicklas/capybara/issues/issue/188 --- lib/capybara/util/save_and_open_page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/capybara/util/save_and_open_page.rb b/lib/capybara/util/save_and_open_page.rb index 29f4dfbf..e5d9c337 100644 --- a/lib/capybara/util/save_and_open_page.rb +++ b/lib/capybara/util/save_and_open_page.rb @@ -30,7 +30,7 @@ module Capybara list << name if File.directory?(name) and not name.to_s =~ /^\./ list end - response_html.gsub(/("|')\/(#{directories.join('|')})/, '\1' + Capybara.asset_root.to_s + '/\2') + response_html.gsub(/=("|')\/(#{directories.join('|')})/, '=\1' + Capybara.asset_root.to_s + '/\2') end end end