There's more than one way to do things | |
PerlMonks |
Re: CGI.pm problemsby Illiad (Initiate) |
on Dec 14, 2001 at 04:07 UTC ( [id://131844]=note: print w/replies, xml ) | Need Help?? |
Rather simple reason that CGI.pm isn't doing what you'd like it to: 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: 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%3E Which is how it should look if you're following the standards for URL quoting. Now, using CGI.pm:
Voila!
In Section
Seekers of Perl Wisdom
|
|