From 17e5fb0dc00ac006d12ca1b5d0a88719ef3bc882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= <regis@hanol.fr> Date: Mon, 23 Oct 2017 19:09:38 +0200 Subject: [PATCH] fix the build --- lib/cooked_post_processor.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index 2aacbe3fb4f..30f91d44e41 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -36,7 +36,7 @@ class CookedPostProcessor post_process_oneboxes optimize_urls update_post_image - enforce_no_follow + enforce_nofollow pull_hotlinked_images(bypass_bump) grant_badges DiscourseEvent.trigger(:post_process_cooked, @doc, @post) @@ -314,14 +314,14 @@ class CookedPostProcessor @has_oneboxes = true Oneboxer.onebox(url, args) end - + uploads = oneboxed_image_uploads.select(:url, :origin) oneboxed_images.each do |img| url = img["src"].sub(/^https?:/i, "") upload = uploads.find { |u| u.origin.sub(/^https?:/i, "") == url } img["src"] = upload.url if upload.present? end - + # make sure we grab dimensions for oneboxed images oneboxed_images.each { |img| limit_size!(img) } end @@ -351,7 +351,7 @@ class CookedPostProcessor img["src"] = Discourse.store.cdn_url(img["src"]) if use_s3_cdn end end - + def enforce_nofollow if !@cooking_options[:omit_nofollow] && SiteSetting.add_rel_nofollow_to_user_content PrettyText.add_rel_nofollow_to_user_content(@doc)