From 6f90a88bad3c3c40caf61e3e93d814969df7a290 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Thu, 21 Oct 2021 17:22:57 +0200
Subject: [PATCH] strip

---
 app/helpers/admin/application_helper.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/helpers/admin/application_helper.rb b/app/helpers/admin/application_helper.rb
index 138e68211..c27d0ae74 100644
--- a/app/helpers/admin/application_helper.rb
+++ b/app/helpers/admin/application_helper.rb
@@ -64,7 +64,9 @@ module Admin::ApplicationHelper
     text = sanitize html.to_s,
                     tags: %w(table a figure img figcaption i em b strong h2 h3 h4 h5 h6 blockquote),
                     attributes: %w(href alt title target rel src srcset width height)
-    CGI.escapeHTML text
+    text = CGI.escapeHTML text
+    text = text.strip
+    text
   end
 
   private
-- 
GitLab