BUGFIX: do not lightbox oneboxed images

This commit is contained in:
Régis Hanol 2014-05-12 12:07:05 +02:00
parent cf40851905
commit 1566693b6e
2 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class CookedPostProcessor
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)

View File

@ -46,6 +46,7 @@ Fabricator(:post_with_images_in_quote_and_onebox, from: :post) do
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