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

A

aktxyz

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
 
D

Daniel Sheppard

Pipes should be escaped in a uri:

URI.escape('|')
=3D> "%7C"=20
-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]]=20
Sent: Thursday, 20 December 2007 4:20 PM
To: ruby-talk ML
Subject: URI.parse not like pipes (|) in url?
=20
URI.parse("http://chart.apis.google.com/chart?
cht=3Dlc&chs=3D200x30&chd=3Dt:-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=3D336699&chls=3D2,1,0&chm=3Do,
990000,0,1,4|o,990000,0,41,4&chxt=3Dr,x,y&chxs=3D0,990000,11,0,_|
=
1,990000,1,0,_|2,990000,1,0,_&chxl=3D0:|$-2940.39|1:||2:||&chxp=3D0,16.1"=
)
=20
returns
=20
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
=20
=20
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top