Defect #32752

Ruby 2.7: Remove deprecated URI.escape/unescape

Added by Go MAEDA almost 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:


Category:Ruby support
Target version:-
Resolution:Fixed Affected version:


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

$ egrep -nr 'URI\.(un)?(escape|encode)' app lib test
lib/redmine/scm/adapters/subversion_adapter.rb:111:                entries <<{: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}
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}")

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

Related issues

Related to Redmine - Feature #31500: Ruby 2.7 support Closed

Associated revisions

Revision 19455
Added by Go MAEDA over 1 year ago

Ruby 2.7: Remove deprecated URI.escape/unescape (#32752).

Patch by Go MAEDA.


#1 Updated by Go MAEDA almost 2 years ago

#2 Updated by Go MAEDA almost 2 years ago

Here is a patch to remove URI.escape and URI.unescape.

The patch adds Addressable gem to Gemfile, but actually it does not mean that the patch adds a new gem dependency because Addressable gem is required by Roadie and is already in Gemfile.lock.

#3 Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed as a part of #31500.

Also available in: Atom PDF