diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-06 13:04:18 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-06 13:04:18 +0000 |
commit | 270efdf221c1ae52408c5a05e9592cb18f3d10df (patch) | |
tree | 1a816f7e8afa540e62db75b1856fb77a6cf07f48 | |
parent | 4837771117ece4d018e4be0005265ca3b4333f80 (diff) | |
parent | 299114948bc12c92fb182e739b7cbb47d310d9e6 (diff) | |
download | gitlab-ce-270efdf221c1ae52408c5a05e9592cb18f3d10df.tar.gz |
Merge branch 'improve-autolink' into 'master'
Improve autolink
Fixes #1649
See merge request !1155
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/views/groups/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/_home_panel.html.haml | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 34d312b4100..e8a9c2efadf 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -259,4 +259,8 @@ module ApplicationHelper super end + + def escaped_autolink(text) + auto_link ERB::Util.html_escape(text), link: :urls + end end diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 4f4fc537d34..d876e87852c 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -24,7 +24,7 @@ = @group.name - if @group.description.present? %p - = auto_link @group.description, link: :urls + = escaped_autolink(@group.description) = render "projects", projects: @projects - if current_user .prepend-top-20 diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index cdbdec698fa..672a91e0eef 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -3,7 +3,7 @@ .project-home-row .project-home-desc - if @project.description.present? - = auto_link ERB::Util.html_escape(@project.description), link: :urls + = escaped_autolink(@project.description) - if can?(current_user, :admin_project, @project) – = link_to 'Edit', edit_project_path |