From a9e2d1aeb576dc8a80a7f0362b89565a473e9fed Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Tue, 3 May 2022 16:50:20 +0000 Subject: [PATCH] Fix rendering invalid URI fails with exception in CommonMark Markdown (#36958). Patch by Holger Just. git-svn-id: https://svn.redmine.org/redmine/trunk@21558 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../wiki_formatting/common_mark/external_links_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d2ea3fafa..4c25a7b13 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,7 @@ module Redmine next unless url next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':') - scheme = URI.parse(url).scheme + scheme = URI.parse(url).scheme rescue nil next if scheme.blank? klass = node["class"].presence