in reply to CGI.pm problems
Your incomming XML is likely unquoted.
Let's assume you're trying to pass in this small XML string (I'll do the example in GET, since CGI.pm handles GET and POST transparantly): "<xmltag>Tulips & Flowers<xmltag>".
in a get request this is going to look like:
script.pl?xml=<xmltag>Tulips & Flowers<xmltag>
Ick! Since you haven't followed the specs for escapeing URLs, it's going to get nasty.
Get the people who are sending your request to properly escape the data:
$newval will now look more like: %3Cxmltag%3Etulips%20%26amp%3B%20Flowers%3A%3C%2Fxmltag%3Emy $newval = CGI::escape(qq("<xmltag>tulips & Flowers:</xmltag>));
Which is how it should look if you're following the standards for URL quoting.
Now, using CGI.pm:
use CGI.pm my $q = new CGI; my $xml = CGI::unescape($q->param('xml'));
Voila!
|
|---|