Actions
Defect #32752
closedRuby 2.7: Remove deprecated URI.escape/unescape
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
Related issues
Updated by Go MAEDA almost 5 years ago
- Related to Feature #31500: Ruby 2.7 support added
Updated by Go MAEDA almost 5 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.
Updated by Go MAEDA almost 5 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed as a part of #31500.
Updated by Go MAEDA about 2 years ago
- Related to Defect #37718: Repository browser does not show "+" (plus sign) in filename added
Updated by Go MAEDA over 1 year ago
- Related to Defect #38464: Rendering a custom field with a URL pattern set and containing " :" in the value raises Addressable::URI::InvalidURIError added
Actions