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 4c25a7b13..2aab08aa1 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/system/inline_autocomplete_test.rb b/test/system/inline_autocomplete_test.rb index 0490c6947..fd0ac7a22 100644 --- a/test/system/inline_autocomplete_test.rb +++ b/test/system/inline_autocomplete_test.rb @@ -185,6 +185,5 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase within('.tribute-container') do assert page.has_text? "Dave Lopper" end - end end