From: Tanaka Akira Date: 2010-07-31T21:54:43+09:00 Subject: [ruby-core:31561] Re: [Bug #3457] URI.encode does not escape square brackets 2010/7/31 Roger Neel : > Issue #3457 has been updated by Roger Neel. > > > I want to throw my hat in the ring that this should be reopened. It's not the expected behavior of URI.encode to not handle 'unsafe' characters as laid out here: > http://www.blooberry.com/indexdot/html/topics/urlencoding.htm Don't use URI.encode. What charaters should be encoded are context sensitive but URI.encode is context insensitive. "[" should be percent-encoded except for IPv6 addresses. URI should be composed by concatenating encoded components with delimiters. URI.encode which encode a whole URI is the just a wrong way to composing a URI. Don't use it. -- Tanaka Akira