diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-23 07:56:27 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-23 07:56:27 +0300 |
commit | a7b0ee3fd17d4e2afd427606b002d3a9f7c6673d (patch) | |
tree | fadfacf68e8a6020bc7c24083271bdf4595f91b4 /app/helpers/gitlab_markdown_helper.rb | |
parent | 03fd5919a393b8784c601c76c3ed65912f4b522a (diff) |
Fix cases where Markdown did not render links in activity feed
HTML would be stripped in `truncate_if_block` when a comment had multiple lines
and the first wasn't long enough to be truncated. The use of `node.content` would
strip all HTML tags. Using `node.inner_html` retains these tags and puts the
"..." in between paragraph tags.
Closes #2586
Diffstat (limited to 'app/helpers/gitlab_markdown_helper.rb')
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index 78bf25f55e7..153a44870f6 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -165,7 +165,7 @@ module GitlabMarkdownHelper # and return true. Otherwise return false. def truncate_if_block(node, truncated) if node.element? && node.description.block? && !truncated - node.content = "#{node.content}..." if node.next_sibling + node.inner_html = "#{node.inner_html}..." if node.next_sibling true else truncated |