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 4e575e3..fd2cdf5 100644 --- a/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb +++ b/lib/redmine/wiki_formatting/common_mark/external_links_filter.rb @@ -32,8 +32,12 @@ module Redmine next unless url next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':') - scheme = URI.parse(url).scheme - next if scheme.blank? + begin + scheme = URI.parse(url).scheme + next if scheme.blank? + rescue URI::InvalidURIError + next + end klass = node["class"].presence node["class"] = [