diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-15 12:37:19 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-15 12:37:19 +0000 |
commit | 089f5b914eed846c32a00f0fa71f7cfdca1dd654 (patch) | |
tree | 38adda4cf82cc4d506b2f1744c25e2ce0017d53f /app/models/commit.rb | |
parent | 4ab22a8c32acda065b8173616f7bf116b637a4a8 (diff) | |
parent | 5662b2413206db20f935a0dffb5f12debd248447 (diff) | |
download | gitlab-ce-089f5b914eed846c32a00f0fa71f7cfdca1dd654.tar.gz |
Merge branch 'emailsonpush-hellip' into 'master'
Don't use HTML ellipsis in EmailsOnPush subject truncated commit message.
Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2229.
Since the page is encoded as UTF-8, we don't need HTML entities anymore and can just use the character.
See merge request !521
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 7a0ad137650..006fa62c8f9 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -77,7 +77,7 @@ class Commit title_end = title.index("\n") if (!title_end && title.length > 100) || (title_end && title_end > 100) - title[0..79] << "…".html_safe + title[0..79] << "…" else title.split("\n", 2).first end @@ -90,7 +90,7 @@ class Commit title_end = safe_message.index("\n") @description ||= if (!title_end && safe_message.length > 100) || (title_end && title_end > 100) - "…".html_safe << safe_message[80..-1] + "…" << safe_message[80..-1] else safe_message.split("\n", 2)[1].try(:chomp) end |