Event note truncates html links
Created by: prototype
GitLab appears to be using Rails' ActionView::Helpers::TextHelper::truncate method in events_helper.rb (#event_note(1)). Rails' truncate method however does not have any knowledge of html tags such as links that are commonly used by us to clarify an issue. Instead, it just truncates based on last occurance of a token and the max length.
This causes issue descriptions containing links at the end of the max length to be broken when rendered via event_note, such is the case at a project's dashboard. This problem can be solved by using a different truncate method that understands html and there appear to be many of these already available, e.g. https://github.com/hgmnz/truncate_html that appears to not have any additional dependencies.