From 6e42959211ac1a51f8ce0d7cb3c6f882806781fd Mon Sep 17 00:00:00 2001
From: ArtOfCode- <hello@artofcode.co.uk>
Date: Tue, 9 Jun 2020 02:51:17 +0100
Subject: [PATCH] Move CommentScrubber

---
 app/controllers/comments_controller.rb | 13 -------------
 app/helpers/comments_helper.rb         | 12 ++++++++++++
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index 538c47c52..915a2c916 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -95,16 +95,3 @@ class CommentsController < ApplicationController
     end
   end
 end
-
-# Provides a custom HTML sanitization interface to use for cleaning up the HTML in questions.
-class CommentScrubber < Rails::Html::PermitScrubber
-  def initialize
-    super
-    self.tags = %w[a b i em strong strike del code]
-    self.attributes = %w[href title]
-  end
-
-  def skip_node?(node)
-    node.text?
-  end
-end
diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb
index 0ec9ca5f2..1feb966f4 100644
--- a/app/helpers/comments_helper.rb
+++ b/app/helpers/comments_helper.rb
@@ -1,2 +1,14 @@
 module CommentsHelper
 end
+
+class CommentScrubber < Rails::Html::PermitScrubber
+  def initialize
+    super
+    self.tags = %w[a b i em strong strike del code]
+    self.attributes = %w[href title]
+  end
+
+  def skip_node?(node)
+    node.text?
+  end
+end
-- 
GitLab