diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-01 16:58:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-01 16:58:19 +0000 |
commit | 1be535443a2071d8143dd24f6727f29e82353548 (patch) | |
tree | 23267d611d3256a9c6ce04a4d306e1a68c4a066c | |
parent | c246ffa184a5c773c05dfa568188575aa978f3ed (diff) | |
download | redmine-1be535443a2071d8143dd24f6727f29e82353548.tar.gz redmine-1be535443a2071d8143dd24f6727f29e82353548.zip |
Limits the schemes that project homepage can use (#22925).
git-svn-id: http://svn.redmine.org/redmine/trunk@15432 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/application_helper.rb | 1 | ||||
-rw-r--r-- | app/views/projects/show.html.erb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3e857e3d9..c727d0be5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -28,6 +28,7 @@ module ApplicationHelper include Redmine::SudoMode::Helper include Redmine::Themes::Helper include Redmine::Hook::Helper + include Redmine::Helpers::URL extend Forwardable def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 33f423ca5..007f0fab2 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -26,7 +26,7 @@ <% if @project.homepage.present? || @subprojects.any? || @project.visible_custom_field_values.any?(&:present?) %> <ul> <% unless @project.homepage.blank? %> - <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to @project.homepage, @project.homepage %></li> + <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li> <% end %> <% if @subprojects.any? %> <li><span class="label"><%=l(:label_subproject_plural)%>:</span> |