mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
BUGFIX: do not lightbox oneboxed images
This commit is contained in:
parent
cf40851905
commit
1566693b6e
2 changed files with 2 additions and 1 deletions
|
@ -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 a new issue