diff --git a/History.txt b/History.txt index c14f1b1..303cfa5 100644 --- a/History.txt +++ b/History.txt @@ -21,6 +21,10 @@ * Adding fix for fields with labels with special characters (Thomas Jack, Mike Gaffney, Bryan Hemlkamp) * Deprecated current_page lh50 (Mike Gaffney) +* Bug fixes + + * Translate CSS and image paths with single quotes in save_and_open_page (Erin Staniland) + == 0.4.4 / 2009-04-06 * Major enhancements diff --git a/lib/webrat/core/save_and_open_page.rb b/lib/webrat/core/save_and_open_page.rb index 1e49f30..0b4aef6 100644 --- a/lib/webrat/core/save_and_open_page.rb +++ b/lib/webrat/core/save_and_open_page.rb @@ -28,7 +28,7 @@ module Webrat def rewrite_css_and_image_references(response_html) # :nodoc: return response_html unless doc_root - response_html.gsub(/"\/(stylesheets|images)/, doc_root + '/\1') + response_html.gsub(/("|')\/(stylesheets|images)/, '\1' + doc_root + '/\2') end def saved_page_dir #:nodoc: diff --git a/spec/public/save_and_open_spec.rb b/spec/public/save_and_open_spec.rb index f6ab953..150a6e1 100644 --- a/spec/public/save_and_open_spec.rb +++ b/spec/public/save_and_open_spec.rb @@ -10,6 +10,7 @@ describe "save_and_open_page" do