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
This commit is contained in:
Marius Balteanu
2022-05-03 16:50:20 +00:00
parent e72790b73f
commit a9e2d1aeb5

View File

@@ -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