diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index ae940e6fb5d..7a691943936 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -147,6 +147,7 @@ class CookedPostProcessor def add_lightbox!(img, original_width, original_height, upload=nil) # first, create a div to hold our lightbox lightbox = Nokogiri::XML::Node.new("div", @doc) + lightbox["class"] = "lightbox-wrapper" img.add_next_sibling(lightbox) lightbox.add_child(img) diff --git a/spec/components/cooked_post_processor_spec.rb b/spec/components/cooked_post_processor_spec.rb index 683c6adfb20..a84a9d2965f 100644 --- a/spec/components/cooked_post_processor_spec.rb +++ b/spec/components/cooked_post_processor_spec.rb @@ -94,7 +94,7 @@ describe CookedPostProcessor do it "generates overlay information" do cpp.post_process_images - cpp.html.should match_html '
+ cpp.html.should match_html '' cpp.should be_dirty