Project

General

Profile

Actions

Defect #32752

closed

Ruby 2.7: Remove deprecated URI.escape/unescape

Added by Go MAEDA almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Ruby support
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Ruby 2.7 shows a warning if URI.escape or URI.unescape is called. We should remove those methods.

https://bugs.ruby-lang.org/issues/15961
https://github.com/ruby/ruby/commit/869e2dd8c8efc1e7a043c9eee82d97c47befbcc7

$ egrep -nr 'URI\.(un)?(escape|encode)' app lib test
lib/redmine/scm/adapters/subversion_adapter.rb:111:                entries << Entry.new({:name => URI.unescape(name),
lib/redmine/scm/adapters/subversion_adapter.rb:292:          uri = URI.escape(URI.escape(uri), '[]')
lib/redmine/field_format.rb:272:        url.gsub!('%value%') {URI.encode value.to_s}
lib/redmine/field_format.rb:273:        url.gsub!('%id%') {URI.encode customized.id.to_s}
lib/redmine/field_format.rb:275:          URI.encode(
lib/redmine/field_format.rb:280:          URI.encode(
lib/redmine/field_format.rb:288:              URI.encode matches[m].to_s
test/functional/wiki_controller_test.rb:1150:      filename = URI.encode("#{title}.#{format}")

Files

32752-remove-uri-escape.patch (4.04 KB) 32752-remove-uri-escape.patch Go MAEDA, 2020-01-11 08:39

Related issues

Related to Redmine - Feature #31500: Ruby 2.7 supportClosedGo MAEDA

Actions
Related to Redmine - Defect #37718: Repository browser does not show "+" (plus sign) in filenameClosedMarius BÄ‚LTEANU

Actions
Related to Redmine - Defect #38464: Rendering a custom field with a URL pattern set and containing " :" in the value raises Addressable::URI::InvalidURIErrorClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF