diff --git a/app/helpers/admin/application_helper.rb b/app/helpers/admin/application_helper.rb
index 8e7177284d5faf548241b31b78d865be4762fdbb..d310aaf50372ba8bab825e0f78b8305f9dd09b76 100644
--- a/app/helpers/admin/application_helper.rb
+++ b/app/helpers/admin/application_helper.rb
@@ -78,7 +78,7 @@ module Admin::ApplicationHelper
   end
 
   def prepare_html_for_static(html, university)
-    text = html.to_s.dup
+    text = html.to_s.strip.dup
     text = sanitize text
     text.gsub! "\r", ''
     text.gsub! "\n", ' '
@@ -87,7 +87,7 @@ module Admin::ApplicationHelper
   end
 
   def prepare_text_for_static(text, depth = 1)
-    text = strip_tags text.to_s.dup
+    text = strip_tags text.to_s.strip.dup
     text = indent text, depth
     CGI.unescapeHTML text
   end