Functions to escape and unescape strings in rails

i have created an appliation to show the pie chart in pdf, now its
showing properly, but the thing is that its not showing the labels
correctly, can anyone help me, pdf of tht ia attached with this.
also i had a pdf.prawn file with the code as below

pdf.image open(URI.escape(@formatted_pie_chart_url)),:width =>
420,:height => 150, :at => [0, 230]

the result of pdf is attached along with this. in that pi chart i
wanted to remove an unsuual string 25% with opened and unopened.
any one please help me