Subject: | I may have found a problem with posting descriptions and other text containing html. I have a solution as well. |
I am running the following:
Net-eBay-0.19
Perl 5
Linux rm-005-16.serve.com 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
When adding an item to ebay with a large amount of HTML, eBay would return errors. I could not find a way to allow for CDATA (eg: <![CDATA[put lots of html and text here]]). Even when I passed <![CDATA[my very long description]]>, eBay.pm converted all of the <'s and >'s to < and >. To fix this, I change the following lines in sub hash2xml:
unless( ref $request ) {
my $data = $request;
$data =~ s/\</\<\;/g;
$data =~ s/\>/\>\;/g;
return $data;
}
I change that code to this and eBay accepted any data I fed it:
unless( ref $request ) {
my $data = $request;
if ($data =~ /\</ || $data =~ /\>/) {
$data = "<![CDATA[".$data."]]>";
}
return $data;
}
If there was already a way to implement CDATA, I apologize as I did not find it anywhere in the documentation. Thanks for making this great module. I appreciate it.
Jeff Strinko