summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/application_helper.rb1
-rw-r--r--lib/redmine/wiki_formatting/common_mark/external_links_filter.rb6
-rw-r--r--test/functional/issues_controller_test.rb2
-rw-r--r--test/functional/messages_controller_test.rb2
-rw-r--r--test/system/inline_autocomplete_test.rb1
-rw-r--r--test/unit/lib/redmine/acts/mentionable_test.rb2
6 files changed, 9 insertions, 5 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7603198d4..950cc4c48 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -296,6 +296,7 @@ module ApplicationHelper
end
when 'CustomValue', 'CustomFieldValue'
return "" unless object.customized&.visible?
+
if object.custom_field
f = object.custom_field.format.formatted_custom_value(self, object, html)
if f.nil? || f.is_a?(String)
diff --git a/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb b/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
index 2928fb990..5fd31091b 100644
--- a/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
+++ b/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
@@ -31,7 +31,11 @@ module Redmine
next unless url
next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':')
- scheme = URI.parse(url).scheme rescue nil
+ scheme = begin
+ URI.parse(url).scheme
+ rescue
+ nil
+ end
next if scheme.blank?
klass = node["class"].presence
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 412d65e88..0faccb8be 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -1187,7 +1187,7 @@ class IssuesControllerTest < Redmine::ControllerTest
create!(
:name => 'Long text', :field_format => 'text',
:full_width_layout => '1',
- :tracker_ids => [1,3], :is_for_all => true
+ :tracker_ids => [1, 3], :is_for_all => true
)
issue = Issue.find(1)
issue.custom_field_values = {field.id => 'This is a long text'}
diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb
index 137e95085..317e121ef 100644
--- a/test/functional/messages_controller_test.rb
+++ b/test/functional/messages_controller_test.rb
@@ -318,7 +318,7 @@ class MessagesControllerTest < Redmine::ControllerTest
:params => {
:board_id => 1,
:id => 3
- },
+ }
)
assert_response 404
diff --git a/test/system/inline_autocomplete_test.rb b/test/system/inline_autocomplete_test.rb
index 26fba9ccd..be1765b6b 100644
--- a/test/system/inline_autocomplete_test.rb
+++ b/test/system/inline_autocomplete_test.rb
@@ -201,7 +201,6 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
within('.tribute-container') do
assert page.has_text? "Dave Lopper"
end
-
end
def test_inline_autocomplete_for_users_on_issues_bulk_edit_show_autocomplete
diff --git a/test/unit/lib/redmine/acts/mentionable_test.rb b/test/unit/lib/redmine/acts/mentionable_test.rb
index 363736f2a..f9dcd7629 100644
--- a/test/unit/lib/redmine/acts/mentionable_test.rb
+++ b/test/unit/lib/redmine/acts/mentionable_test.rb
@@ -29,7 +29,7 @@ class Redmine::Acts::MentionableTest < ActiveSupport::TestCase
:issues
def test_mentioned_users_with_user_mention
- to_test = %w(@dlopper @dlopper! @dlopper? @dlopper. @dlopper,)
+ to_test = %w(@dlopper @dlopper! @dlopper? @dlopper. @dlopper)
to_test.each do |item|
issue = Issue.generate!(project_id: 1, description: item)