From: anykeyh@... Date: 2015-12-15T05:39:09+00:00 Subject: [ruby-core:72137] [Ruby trunk - Bug #11819] [Open] URI::encode issue with the "+" character Issue #11819 has been reported by Yacine PETITPREZ. ---------------------------------------- Bug #11819: URI::encode issue with the "+" character https://bugs.ruby-lang.org/issues/11819 * Author: Yacine PETITPREZ * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- `URI.encode("a+b")` returns "a+b". Mostly all web servers transform the "+" in URI parameters to space, and can create issue with base64 encoded parameters for example. Currently we must write this: `args = URI.encode(args).gsub("+", "%2B")` Also, the rfc2396 says (G. 2): ` The plus "+", dollar "$", and comma "," characters have been added to those in the "reserved" set, since they are treated as reserved within the query component.` -- https://bugs.ruby-lang.org/