Defect #32752
Ruby 2.7: Remove deprecated URI.escape/unescape
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Ruby support | |||
Target version: | - | |||
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}")
Related issues
Associated revisions
Ruby 2.7: Remove deprecated URI.escape/unescape (#32752).
Patch by Go MAEDA.
History
#1
Updated by Go MAEDA about 3 years ago
- Related to Feature #31500: Ruby 2.7 support added
#2
Updated by Go MAEDA about 3 years ago
- File 32752-remove-uri-escape.patch
added
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 about 3 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed as a part of #31500.
#4
Updated by Go MAEDA 4 months ago
- Related to Defect #37718: Repository browser does not show "+" (plus sign) in filename added