Feature #32424 » 0006-Fixes-HTTP-500-error-when-invalid-URIs-are-provided-.patch
| lib/redmine/wiki_formatting/common_mark/external_links_filter.rb | ||
|---|---|---|
| 31 | 31 |
next unless url |
| 32 | 32 |
next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':')
|
| 33 | 33 | |
| 34 |
scheme = URI.parse(url).scheme |
|
| 35 |
next if scheme.blank? |
|
| 34 |
begin |
|
| 35 |
scheme = URI.parse(url).scheme |
|
| 36 |
next if scheme.blank? |
|
| 37 |
rescue URI::InvalidURIError |
|
| 38 |
next |
|
| 39 |
end |
|
| 36 | 40 | |
| 37 | 41 |
klass = node["class"].presence |
| 38 | 42 |
node["class"] = [ |