BUGFIX: do not lightbox oneboxed images
This commit is contained in:
parent
cf40851905
commit
1566693b6e
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue