Skip to content

Commit 1be5354

Browse files
committed
Limits the schemes that project homepage can use (#22925).
git-svn-id: http://svn.redmine.org/redmine/trunk@15432 e93f8b46-1217-0410-a6f0-8f06a7374b81
1 parent c246ffa commit 1be5354

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/helpers/application_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ module ApplicationHelper
2828
include Redmine::SudoMode::Helper
2929
include Redmine::Themes::Helper
3030
include Redmine::Hook::Helper
31+
include Redmine::Helpers::URL
3132

3233
extend Forwardable
3334
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter

app/views/projects/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<% if @project.homepage.present? || @subprojects.any? || @project.visible_custom_field_values.any?(&:present?) %>
2727
<ul>
2828
<% unless @project.homepage.blank? %>
29-
<li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to @project.homepage, @project.homepage %></li>
29+
<li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
3030
<% end %>
3131
<% if @subprojects.any? %>
3232
<li><span class="label"><%=l(:label_subproject_plural)%>:</span>

0 commit comments

Comments
 (0)