Remove surveys from topic excerpts.

Remove surveys from topic excerpts.

diff --git a/plugin.rb b/plugin.rb
index aed8619..6c255bb 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -127,4 +127,9 @@ after_initialize do
     SiteSetting.surveys_enabled && preloaded_surveys.present?
   end
 
+  # Remove surveys from topic excerpts
+  on(:reduce_excerpt) do |doc, post|
+    doc.css(".survey").remove
+  end
+
 end

GitHub sha: 8b903454

There should be a test for that :wink: