Skip to content

Commit

Permalink
BUGFIX: do not lightbox oneboxed images
Browse files Browse the repository at this point in the history
  • Loading branch information
ZogStriP committed May 12, 2014
1 parent cf40851 commit 1566693
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cooked_post_processor.rb
Expand Up @@ -65,7 +65,7 @@ def post_process_images

def extract_images
# do not extract images inside oneboxes or quotes
@doc.css("img") - @doc.css(".onebox-result img") - @doc.css(".quote img")
@doc.css("img") - @doc.css(".onebox-result img, .onebox img") - @doc.css(".quote img")
end

def limit_size!(img)
Expand Down
1 change: 1 addition & 0 deletions spec/fabricators/post_fabricator.rb
Expand Up @@ -46,6 +46,7 @@
cooked '
<aside class="quote"><img src="/uploads/default/1/1234567890123456.jpg"></aside>
<div class="onebox-result"><img src="/uploads/default/1/1234567890123456.jpg"></div>
<div class="onebox"><img src="/uploads/default/1/1234567890123456.jpg"></div>
'
end

Expand Down

0 comments on commit 1566693

Please sign in to comment.