Feature #32424 » 0003-CommonMark-external_links_filter.rb.patch
| lib/redmine/wiki_formatting/common_mark/external_links_filter.rb | ||
|---|---|---|
| 32 | 32 |
next unless url |
| 33 | 33 |
next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':')
|
| 34 | 34 | |
| 35 |
scheme = URI.parse(url).scheme |
|
| 36 |
next if scheme.blank? |
|
| 35 |
begin |
|
| 36 |
scheme = URI.parse(url).scheme |
|
| 37 |
next if scheme.blank? |
|
| 38 |
rescue URI::InvalidURIError |
|
| 39 |
next |
|
| 40 |
end |
|
| 37 | 41 | |
| 38 | 42 |
klass = node["class"].presence |
| 39 | 43 |
node["class"] = [ |