CGI escaping for ruby2

URI.parse in ruby2 does not like |