cURL / Mailing Lists / curl-users / Single Mail

curl-users

Curl with data and &

From: mikey <abc.mikey_at_googlemail.com>
Date: Tue, 24 Nov 2009 14:30:57 +0000

Hi,

I've written a little script to send data to pastebin with a command like:

curl -d format="$lang" --data-binary code2="$input" -d poster="$nick"
-d expiry=expiry_day -d paste=Send -i -s http://pastebin.com

Which is fine unless I put something like;

curl -d format="text" --data-binary code2="This is some text to try &
a little bit more to go after the amp." -d poster="mikey" -d
expiry=expiry_day -d paste=Send -i -s http://pastebin.com

In which case it will only post as far as the & i.e. "This is some text to try "

What do I do to work around this?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-24