diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb
index cd8761a6113f6774ec799aec57f683176cad04b4..4aeb65752f0b4a0769df2dcdb64d67caaf7ff197 100644
--- a/app/helpers/events_helper.rb
+++ b/app/helpers/events_helper.rb
@@ -127,4 +127,10 @@ module EventsHelper
     text = truncate(text, length: 150)
     sanitize(markdown(text), tags: %w(a img b pre p))
   end
+
+  def event_commit_title(message)
+    escape_once(truncate(message.split("\n").first, length: 70))
+  rescue
+    "--broken encoding"
+  end
 end
diff --git a/app/views/events/_commit.html.haml b/app/views/events/_commit.html.haml
index 4d4b24009f43cd9923cb0b878eebe1d7cfb14b4a..135320da57ea7b17d6a9424f7d996a69de2daabe 100644
--- a/app/views/events/_commit.html.haml
+++ b/app/views/events/_commit.html.haml
@@ -2,4 +2,4 @@
   .commit-row-title
     = link_to commit[:id][0..8], project_commit_path(project, commit[:id]), class: "commit_short_id", alt: ''
      
-    = gfm escape_once(truncate(commit[:message], length: 70)) rescue "--broken encoding"
+    = gfm event_commit_title(commit[:message])