URI.parse not like pipes (|) in url?

URI.parse(“http://chart.apis.google.com/chart?
cht=lc&chs=200x30&chd=t:-1,53.9,53.9,40.0,38.6,34.3,32.5,31.0,30.1,26.7,24.8,23.1,21.7,11.5,10.9,10.1,5.7,3.7,2.1,0.0,9.5,100.0,98.3,95.8,91.8,85.0,83.8,81.8,66.5,59.7,56.7,53.9,52.1,35.3,33.9,33.4,28.7,27.3,23.6,20.7,18.5,16.1&chco=336699&chls=2,1,0&chm=o,
990000,0,1,4|o,990000,0,41,4&chxt=r,x,y&chxs=0,990000,11,0,|
1,990000,1,0,
|2,990000,1,0,_&chxl=0:|$-2940.39|1:||2:||&chxp=0,16.1”)

returns

    from /usr/lib/ruby/1.8/uri/common.rb:436:in `split'
    from /usr/lib/ruby/1.8/uri/common.rb:485:in `parse'
    from (irb):2

Pipes should be escaped in a uri:

URI.escape(’|’)
=> “%7C”

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, 20 December 2007 4:20 PM
To: ruby-talk ML
Subject: URI.parse not like pipes (|) in url?

URI.parse("http://chart.apis.google.com/chart?
cht=lc&chs=200x30&chd=t:-1,53.9,53.9,40.0,38.6,34.3,32.5,31.0,
30.1,26.7,24.8,23.1,21.7,11.5,10.9,10.1,5.7,3.7,2.1,0.0,9.5,100.0,98.3,9
5.8,91.8,85.0,83.8,81.8,66.5,59.7,56.7,53.9,52.1,35.3,33.>
9,33.4,28.7,27.3,23.6,20.7,18.5,16.1&chco=336699&chls=2,1,0&chm=o,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs