Project

General

Profile

Feature #32424 » 0003-CommonMark-external_links_filter.rb.patch

Fix InvalidURIError exception - Martin Cizek, 2020-02-21 14:14

View differences:

lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
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"] = [
(3-3/26)