From 747243cc0e35a34cd48c12fed6b7d4430cd68997 Mon Sep 17 00:00:00 2001 From: zzak Date: Sun, 27 Jul 2014 21:27:10 +0000 Subject: * lib/uri/common.rb: [DOC] [Bug #9563] Recommend using URI.escape before parsing a uri to avoid invalid characters. Reported by Evgeniy Serykh. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/common.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/uri') diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 006b271477..6378541cbe 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -219,6 +219,9 @@ module URI # p uri.host # # => "www.ruby-lang.org" # + # It's recommended to first ::escape the provided +uri_str+ if there are any + # invalid URI characters. + # def self.parse(uri) RFC3986_PARSER.parse(uri) end -- cgit v1.2.3