From 1566693b6e34d2346c73d9765254574ee6956813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 12 May 2014 12:07:05 +0200 Subject: [PATCH] BUGFIX: do not lightbox oneboxed images --- lib/cooked_post_processor.rb | 2 +- spec/fabricators/post_fabricator.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index f25053b91..11e1ad825 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -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) diff --git a/spec/fabricators/post_fabricator.rb b/spec/fabricators/post_fabricator.rb index 5c1721e12..2ff3bb792 100644 --- a/spec/fabricators/post_fabricator.rb +++ b/spec/fabricators/post_fabricator.rb @@ -46,6 +46,7 @@ Fabricator(:post_with_images_in_quote_and_onebox, from: :post) do cooked '
+
' end